What do you want to save?
Add Code snippet
New code examples
-
Javascript 2021-11-16 15:26:08
react native snackbar
//in the terminal: npm i react-native-snackbar --save //code: import Snackbar from 'react-native-snackbar'; Snackbar.show({ text: 'Hello world', duration: Snackbar.LENGTH_INDEFINITE, action: { text: 'UNDO', textColor: 'green', onPress:... Add solution -
TypeScript 2021-09-27 00:34:02
too many re-renders. react limits the number of renders to prevent an infinite loop.
I suspect that the problem lies in the fact that you are calling your state setter immediately inside the function component body, which forces React to re-invoke your function again, with the same props, which ends up calling the state setter again, whic... Add solution