Hi everybody,
I know my question is very concrete but i also want to tell you a bit of the process in a short history to give you a context.
Two months ago i started to working for a startup, my first task there was to make a Mobile App (only for Android right now) using React Native. I didn't have any experience with React Native or React when i started, so i thought my best possible choice was to use a starter-kit.
So i started changing the style colors, little steps but my boss needed to see progress, so the next step was try to make the Login screen. The starter-kit i mention above used some folder distribution like:
Of course i have read something about React and React Native, but i never used in practice but the hardest thing was just Redux, so i wasted like a week just making a file inside Screens called Login.js, creating a form inside it asking for email and password, creating an action and the reducer for the login process. And of course in a bad way (fetching data from the Login Screen and just passing the response to the action).
A little thing i would like to highlight is a problem i had with the Navigator and Redux: the starter-kit connected the store with a container (containers/app.js) in that component it set up the sidenav (where i put the login screen) and then i just tried to pass the "auth part" of the store using props to have access in the Login Screen. But i realize when i logged in the state in Login Screen never got updated, but the logs of the Redux State show the token. Luckily when i was researching for the problem, somewhere i read that Navigator doesn't update the state of the components due to performance topics. So what i did to "solve" the problem was to pass auth as a function which retrieve the current auth of the store and i still feel terrible for doing that.
Okay now i had the Login Screen working, for the application i was making there is a simple process divided in steps (each one is a screen):
But since this point of time, my boss needed to see more progress, so i just did not continue using redux for the remaining screens i cited above. So i just made the Screens with some reusable components but the flow was entirely linear, so when the user log in, i just push the next screen to the Navigator stack and passed the previous fetched data as property and so on with all the screens.
I just finished a MVP of the application but after a break (helping the team with fronted things) i had to return to the Mobile App, and i want to fix everything i did wrong, so a have a couple of questions:
Thanks everybody for read, i really appreciate it. Also excuse me by my poor English.
No responses yet.