I'm designing a navigation controller (based loosely around the mobile version of this: https://developer.apple.com/documentation/uikit/uinavigationcontroller
I would like to allow for push and pop functionality of a collection of views (which the user can navigate from). The question is, where do I store my collection of components.
For example if I make an action like:
export function pushViewController(view) {}
Can I push that in a reducer that has a state collection of views like so (obviously creating a new slice of state while doing so, not actually 'pushing' so as to avoid confusion that I'm mutating state here):
const initialState = { views: [<View />] }
I've done a little reading but have seen varying opinions on whether or not this is 'ok' practice in Redux. Is pushing views this way even proper form? Would love some input on this, thanks in advance.