BrandonArmand / Binari

Interactive code editor with a live binary tree visual designed to teach new developers the fundamentals of Data Structures.
https://binari.dev
MIT License
181 stars 113 forks source link

Replace the current state with Redux #1

Closed BrandonArmand closed 4 years ago

BrandonArmand commented 4 years ago

What needs to be done.

We need to include Redux and begin migrating the current state managers to Redux.

Why

The current state has grown too large to be used easily, and with expectations of growth, we will need a more organized state.

How

The Playground view currently has 2 states, and there are plans to add roughly 2 more. So we need to change all the states in the playground into separate files. The earlier we change it, the easier future development will become.

gooseNjuice commented 4 years ago

Interesting task for me.

NKaty commented 4 years ago

Hi. I am replacing the current state of the Playground component with redux. And I've noticed we don't save the state of the Playground code when a user changes the directories. As a result all the code written by a user is lost. Is it a desired behaviour? If not, I suggest saving the current state for each directory in redux. This way, a user will be able to return to their code. I've also noticed a few warnings in the console. I am thinking of fixing them. But there is no such issue. Should I create the issue first, or would a simple pull request be sufficient?

BrandonArmand commented 4 years ago

@NKaty Saving the state when the directories change would be great, especially for what we have planned in the coming months. And you are also very welcome to just fix the warnings (: