Skip to content

Warning : Failed child context type: Invalid child context 'virtualizedCell.cellKey' of type 'number' supplied to 'CellRenderer', expected 'string' #125

@ishigamii

Description

@ishigamii

HI, I am currently using :
"react": "16.2.0"
"react-native": "0.53.0"

I created a brand new project and added the react-native-pdf, the app launch well and the pdf is shown no problem for that but I get the following warning. :

capture d ecran 2018-02-08 a 10 58 23

capture d ecran 2018-02-08 a 10 58 32

my code is a simple copy and paste of yours :

import Pdf from 'react-native-pdf';
...
  render() {
    const source = {uri:'http://unec.edu.az/application/uploads/2014/12/pdf-sample.pdf',cache:false};
    return (
      <View style={styles.container}>
        <Pdf source={source}
        onLoadComplete={(numberOfPages,filePath)=>{
            console.log(`number of pages: ${numberOfPages}`);
        }}
        onPageChanged={(page,numberOfPages)=>{
            console.log(`current page: ${page}`);
        }}
        onError={(error)=>{
            console.log(error);
        }}
        style={styles.pdf}/>
      </View>
    );
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    justifyContent: 'center',
    alignItems: 'center',
    backgroundColor: '#F5FCFF',
  },
  pdf: {
    flex:1,
    width:Dimensions.get('window').width,
  }
});

Maybe I missed a step or is that an issue ?

Thanks a lot.
Best regards.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions