Skip to content

Two-way coupling (with redux) yields infinite loops #135

@rreusser

Description

@rreusser

I need to store the current page in redux. So onChangeTab triggers a redux action to set the state. Redux state in turn must be able to set the page via (the misnomer) initialPage. As it's navigating to the page though, I get more onChangeTab events which trigger redux changes which etc. etc. and now it's totally out of control.

The possibilities are either:

  1. This is simple and I'm making it difficult
  2. I can make this work with clever flags and switches on my end
  3. The API needs an additional feature (scroll end?) or some sort of latch to prevent this
  4. This is just a bad idea to begin with and there's a better way to do what I'm trying to do

I can see the argument for all four. Glad to invent a solution, but curious for direction before embarking. Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions