Week 7 - Continuing refactoring
SummaryPermalink
This week I continued solving bugs in the code needed for subtree composition. They were mainly related with state management and unwanted re-renders.
Memoizing componentsPermalink
This week, I consolidated different components I refactored in the previous weeks, ensuring proper state management to allow the subtree editor to work.
I mainly memoized a lot of components so they don’t re-render if the props have not changed.
On top of that, I moved the state used in the editor to a wrapper component higher in the hierarchy. This allows this component to re-render without affecting the main editor.