Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Redux state container for ESP8226, ESP32 #3420

Closed
shubham-sri opened this issue Apr 9, 2021 · 1 comment · May be fixed by #3421
Closed

Redux state container for ESP8226, ESP32 #3420

shubham-sri opened this issue Apr 9, 2021 · 1 comment · May be fixed by #3421

Comments

@shubham-sri
Copy link

shubham-sri commented Apr 9, 2021

Missing Feature: NodeRedux - state container

Redux is a predictable state container for JavaScript apps. So we can use the same concept to manage the state of ESP devices. It helps you write applications that behave consistently.

Justification

The whole global state of your app is stored in an object tree inside a single store. The only way to change the state tree is to create an action, an object describing what happened, and dispatch it to the store. To specify how the state gets updated in response to an action, you write pure reducer unctions that calculate a new state based on the old state and the action.

Workarounds

I have translated the logic of Redux in JS to Lua. You can check here

@nwf
Copy link
Member

nwf commented Jun 3, 2021

Closing; further discussion can take place on the PR.

@nwf nwf closed this as completed Jun 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants