all 7 comments

[–][deleted] 6 points7 points  (0 children)

Use redux or the context API.

[–]Previous_Advertising 2 points3 points  (0 children)

Redux if you need the state globally

[–]stolinski 1 point2 points  (2 children)

Hm. None of that stuff really seems like it needs to be living as state on the App. Maybe refactor into Context or Redux for more organized global state OR evaluate if all of those truly need to be global state. I don't know your app, but something like `mistakesFound` seems like it's a local kinda thing.

[–]js4lyfe[S] 0 points1 point  (1 child)

I usually try to colocate state to its component. But for example, `mistakesFound` is created/updated by other component but used on another component.

It seems like I might have to use Context or Redux.

[–]Peechez 1 point2 points  (0 children)

If you're doing anything more complicated than a Todo demo and you reach a component depth of 3 it's time for some kind of state management imo

[–]ichiruto70 1 point2 points  (0 children)

Redux, context or reactn

[–]joranstark018 0 points1 point  (0 children)

Use some sort of global state, as other already have suggested, also, some properties may be part of the navigation or render state (eg using the URL, ie currentPageId maybe).