DennisSnijder / BunqWeb

Web client for bunq
26 stars 2 forks source link

Rewrite redux mapping in child components #15

Closed Crecket closed 6 years ago

Crecket commented 6 years ago

Loading all actions and props in the Main component and passing them down to all the pages isn't recommended and results in unused code and a bloated Main component

Moving the required actions/props to the correct child components should cleanup the Main component and make things a lot easier to work with.

Acceptance Criteria

ghost commented 6 years ago

@Crecket Where in the documentations do you see the part that no longer recommends that you pass actions/props top down?

Crecket commented 6 years ago

I edited the issue as it wasn't very clear. What I meant to say was that loading all actions/props in the Main component and passing everything down from that single container is no longer recommended.

Redux used to write their examples like that and I haven't worked on other projects where they did it differently until now.

Rewriting the setup will help when we are code-splitting since we no longer load code from other routes.

Basically I want to prevent and remove this stuff 😄