This does not replace React’s re-render logic, at least no more than Redux does. The beauty of React is that it’s very good at figuring out what has changed by using a shadow DOM, regardless of how state is being stored, or re-renders are triggered.
I only used pure functions for conciseness, there’s no problem using SpaceAce with class components, I’ve done it myself to do exactly what you’re looking to do.
I haven’t used Preact but I assume it’s basically the same as React. Create a root space, then pass it into the App component as a prop, and render. Add a…
Thanks for taking a look and sending your thoughts! I hope it’s alright if I rephrase your points and respond, let me know if I get them wrong:
SpaceAce breaks the pattern of explicitly defined props
I don’t think this is true. In practice you’ll still be using props for values a component uses but…
setState is actually great, but it’s a problem for larger apps because it traps a component’s state inside it. It then becomes a challenge figuring out which components should have state (smart components) and which should just receive props. All SpaceAce spaces branch off of a central space. Allows for tracking/undoing/replaying the entire application’s state.
Excellent question, thanks!
Similarly to how it used to be a best practice to keep your app’s code and HTML separate, it’s currently the best practice to have your state code separate from your render code.
I’ve found that 90% of my state management code is unique to a particular component, so why…
I assume this is a response to the Angular team’s announcement of 6 month intervals between major versions. Maybe they meant that there won’t be breaking changes more frequent than 6 months apart. I’m sure they’re aware that breaking changes are costly to deal with and won’t add them without good reason.