You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
2/ in my screen i just import my helper function then add the component from popup-ui at the end of your root element, ex:
import { Toast } from "popup-ui" // import toast from the lib
import {showToast} from "../utils/helper" // import our helper
......
// where i need it on a check, for exemple
if (!sample.size) {
showToast(Toast, 'Erreur',"Merci de spécifier la taille de votre carotte", 'error')
}
// in the render
<View>
// ....your code here then at the end
<Toast
ref={c => {
if (c) Toast.toastInstance = c
}}
/>
</View>
and it works very well... seems easier like that to me to use it everywhere, i ll fork it to fix the position of the popup (header not counted in the position)
When I try to invoke the popup modal with Popup.show();
I get the following error:
[TypeError: undefined is not an object (evaluating 'this.popupInstance.start')]
The text was updated successfully, but these errors were encountered: