Your server is your main single-source of truth. But on the client, redux is that source of truth that your UX and application code reference.
Lin Clark is amazing at explaining concepts in the React and Mozilla worlds. Here's her intro to Redux concepts: https://code-cartoons.com/a-cartoon-intro-to-redux-3afb77550...
Wondering how I should hide all the goodies, pick an encrypt library and move everything over GET?
I wanted to avoid doing back end work in the mysql/php? I could never get the debugger to work.
If you wanted to render a list of accounts, you could have a couple levels.
At the top, you have an account lists component. It gets a list of accountIds from a global data store (in redux). Then it outputs something like this:
<List>
<Account id="1" />
<Account id="2" />
</List
The Account components then pull info from Redux about whatever they need to render whatever account they're responsible for.Each component registers a listener/callback with Redux when its first instantiated. So if the balance of an account changes, it's listening for that change. The change triggers your callback, that triggers a fresh render(). Then the next render() pass pulls the updated account balance with its next pass, etc.
I like the concept, but I'm struggling ton managing data outside the component. I've read this is by intention.
Thinking I'll just call everything from my server, save user data into the server directly and constantly recall from mysql. Goal would be to eliminate variables. Although this is a pipe dream, I'll still have to keep users logged in, and securely since this is a finance app.
Redux solves this problem?