Oluwaseunus / anime-characters

Anime Characters Web App for a test :fire:
0 stars 0 forks source link

Fetch anime started could do more than return the state, yh? #7

Closed ooade closed 5 years ago

ooade commented 5 years ago

https://github.com/Oluwaseunus/anime-characters/blob/4cf0168c6477e00e80955179d3fcfeaca4328478/src/reducers/animes.js#L8

This relates to #6. What can be done? Besides, you still don't have to change anything.

Oluwaseunus commented 5 years ago

It was mostly supposed to be an initializer for a loading state. i.e., if the 'loading' state would be managed by redux, this action would be dispatched, setting the state to loading, and the Main component would read the loading state from the redux store and use that to decide whether or not to show the loading screen.

ooade commented 5 years ago

Yeah, you could change the loading state from there and control the loader that way. Cool.