free-site-builder icon indicating copy to clipboard operation
free-site-builder copied to clipboard

[✅ASSIGNED] Persistence React/Redux & Refactoring

Open app-generator opened this issue 2 years ago • 2 comments

STATUS: ASSIGNED to @yurec133


Context

The codebase pattern might be improved if the persistence is managed by React/Redux instead of localStorage (the current solution)

@yurec133 Please take into account this request.

Before updating the code, please explain the advantages of such integration.

Ty!

app-generator avatar Jul 17 '23 16:07 app-generator

When we use redux, we will have the state of all entities that are easy to debug. I propose such an architectural approach, when we add an item using onDrop, we bring this element to redux and in redux we change it as needed, then we take it from redux and bring it to the DOM, when we press the save button, we take the data from redux and store it in localStorage and then we take data from localStorage again and enter it in redux state to have up-to-date data

yurec133 avatar Jul 18 '23 06:07 yurec133

Hello @yurec133

All the above arguments are noted. Let's proceed with the development using redux-integration as a test branch:

https://github.com/app-generator/rocket-builder/tree/redux-integration

Thank you!

app-generator avatar Jul 18 '23 07:07 app-generator