react-native-app-intro-slider
react-native-app-intro-slider copied to clipboard
Failed child context type: Invalid child context `virtualizedCell.cellKey` of type `number` supplied to `CellRenderer`, expected `string`.
I am getting this warning again and again How to remove this warning
x2
I am getting this warning again and again How to remove this warning
Found a solution. Just pass your own keyExtractor function to the <AppIntroSlider/>
component and cast to string. FlatList requires a string key.
return (
<AppIntroSlider
keyExtractor={(item) => item.id.toString()}
renderItem={_renderItem}
data={steps}
onDone={_onDone}
renderNextButton={_renderNextButton}
renderDoneButton={_renderDoneButton}
/>
)
This results in
TypeError: undefined is not an object (evaluating 'item.id.toString')
The following worked for me
keyExtractor={(item, index) => index.toString()}
just pass it to your AppIntroSlider
Component
I am getting this warning again and again How to remove this warning
Found a solution. Just pass your own keyExtractor function to the
<AppIntroSlider/>
component and cast to string. FlatList requires a string key.return ( <AppIntroSlider keyExtractor={(item) => item.id.toString()} renderItem={_renderItem} data={steps} onDone={_onDone} renderNextButton={_renderNextButton} renderDoneButton={_renderDoneButton} /> )
work for me.
keyExtractor={(item) => ${item.key}
} or
keyExtractor={(item) => ${item.id}
} with key(id) from a element of data slide