akveo / react-native-ui-kitten

:boom: React Native UI Library based on Eva Design System :new_moon_with_face::sparkles:Dark Mode
https://akveo.github.io/react-native-ui-kitten/
MIT License
10.32k stars 953 forks source link

After creating a SELECT list, Expo returns an error #941

Closed SerTimBerrners-Lee closed 4 years ago

SerTimBerrners-Lee commented 4 years ago

After creating a SELECT list, Expo returns an error State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect().%s,

artyorsh commented 4 years ago

@SerTimBerrners-Lee related code?

achyutb6 commented 4 years ago

const [eventType, setEventType] = React.useState(null); <Select data={filterData} selectedOption={eventType} onSelect={setEventType} />

Gives this warning on Expo -

Warning: State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the comp onent body with useEffect().%s,

artyorsh commented 4 years ago
onSelect={ type => setEventType(type) }