how to fix, blank page when trying to use history push in react native

273 views Asked by At

I am working on a APP, where I created a button that navigates you to other page. I imported react native router and use history from react-router dom.

I created seperated folder with login routs (when user is on login screen he can move to sign-up)

Loginrouts.js :

enter image description here

than I created login.js where the button is, it uses useHistory.push() and it calls signup from loginroute.js

enter image description here

But when button is pressed it only shows blank screen, anyone knows why?

0

There are 0 answers