chingu-voyages / v11-bears-team-05

A project to search for and vote on restaurants as a group, to select one for an event | Voyage-11 | https://chingu.io/
1 stars 1 forks source link

made actions, styles folder. made some functions more modular. #16

Closed rdollent closed 5 years ago

rdollent commented 5 years ago

I had centralised/streamlined the styles and actions.

1) That way, we don't have to import every .scss file on each component, and we can use variables.

2) On the actions side, i had moved constants/errorConstants into types.jsx and an actions.jsx file that houses all dispatch actions.

please refer to the Login and Register components to see how the data flows. basically, the dispatch({type:...}) object was moved to actions.jsx and we export it. that also means, we don't have to import the constants from types.jsx into each component but rather import all types/constants in actions.jsx and dispatch from there.

3) i have changed configureStore to be called and stored in a variable called 'store' - then pass in onto the Provider component. I wanted to call unsubscribe - which tracks the state whenever it changes - and i put a console.log for us to see what the state is on the console.

ermarie commented 5 years ago

I looked through the code and didn't see any major issues. I'll leave it to @ericadev to confirm and merge pull request since y'all are working together on the front end.