How similar is PM architecture to a React / Redux architecture?


#1

I am working on my first React / Redux application, and plan to use ProseMirror for rich editing in the app. I’ve read through old threads here and came across comments from @marijn concerning influences he had from Elm, React, and flux, and also some comments about problems PM faces that aren’t well addressed in those architectures. All of that also was a good bit earlier in the development cycle of PM and I know the API changed a good bit before reaching 1.0. I’ve also come across a couple of dated projects and some comments about using React components in PM.

Can anyone help me understand what the similarities and differences are between ProseMirror’s architecture, and the architecture of a React / Redux app? Is using both in one project duplicating a lot of infrastructure, that (for example) wouldn’t be the case using the React-based Draft.js editor framework?

I read the post @marijn wrote about “read only editors”, and that kind of gets at what my question is rooted in. I’ve been thinking for a while about how to implement a content construction kit that lets a user layout a web page with (for example) custom blocks. It seems like building on top of a data format like PM’s might be a good start, and then reusing some of the machinery to render it read-only. It’s not relevant to the current scope of my project, but more where I’d like to take it in a future version (it’s a job board, and I’d use the functionality to let for example an employer have some control over their profile page or an item-view job posting layout).


#2

It’s similar to Redux, but not quite the same — our transactions are a somewhat different thing than Redux actions—they have a uniform shape, rather than being a kind of sum type. You can read about the way ProseMirror works in the guide.