Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Investigate Redux replacement #1599

Closed
sirugh opened this issue Aug 26, 2019 · 1 comment
Closed

Investigate Redux replacement #1599

sirugh opened this issue Aug 26, 2019 · 1 comment
Labels
enhancement New feature or request

Comments

@sirugh
Copy link
Contributor

sirugh commented Aug 26, 2019

Most of our app state is kept in a global Redux store. Components subscribe to the store to get state, and dispatch actions to the store to set state. They also dispatch async actions, which orchestrate API calls, actions, and even other async actions.

Ideally, components would keep their own view state, make their own API calls, and allow the React scheduler to orchestrate. Hooks make this possible; the goals of this effort are to figure out how to accomplish it, evaluate the ergonomics, and determine how to move forward.

See spike #1483 for code.

Will update issue with findings.

@sirugh sirugh added the enhancement New feature or request label Aug 26, 2019
@sirugh sirugh added this to the Modular Component Library milestone Aug 26, 2019
@sirugh
Copy link
Contributor Author

sirugh commented Sep 10, 2019

We attempted to utilize useReducer and context instead of redux but found it too troublesome when it came down to orchestrating asynchronous actions between components at different locations in the app. For now we are just going to move Redux to peregrine along with the actions, stores, and other related code (venia-ui depends on peregrine, not the other way around).

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant