jho406
Breezy's insight is that frontends are wildly complex due to the industry vertical (say.. childwelfare), so instead of shaping your state for business, breezy shapes it for content. Content being a header, footer, body as opposed to a post model or user model. This means each page is represented as a node in the Breezy Redux tree with its own header body and footer.
On one hand, it is annoying to traverse the pages to make updates, on the other, I can look at any running application and make close-to-correct assumptions on how to update the store. After all, most applications regardless of industry vertical has a header, body and footer somewhere.
Do you handle common area maintenance? Snow shovelling? Cleaning? Sidewalk maintenance? Do you have a requirement on the minimum num of units per building? How do you handle tenants that don't speak English? What is your pricing?
Aside from maintenance, do you have plans to get into full-on property management?
I think “how you shape your state to make it easy to reduce and share between components” is an important topic that’s taken a backseat when discussing state management tooling.
Should I repeat my backend models? Should I use a redux ORM? How much should I denormalize or normalize?
I found it much easier to just denormalize everything and shape state for presentational purposes, e.g, I have a bunch of page nodes in my redux state each with a duplicated header. If I need to make an update to the header in response to, say, a change in user email, I change each duplicated header individually.
Sounds insane but it really works for me and let’s me keep more business logic in the backend where it belongs.
Breezy – An opinionated state shape and PJAX library for React, Redux, and Rails
Or if you want the full power of React, Redux, AND the simplicity of Turbolinks/PJAX. You can use https://jho406.gitbook.io/breezy/ which is Turbolinks for React Redux Rails, you can build SPA without APIs, just by treating JSON as a navigational format.
Full disclosure, I'm the author and I've been trying to get some feedback on the project.
Great thing is, aside from the way it loads data, its just mostly plain Redux and React. Feel free to add your own functionality.