I am building a front end page builder ( SPA ) for wordpress with react and it supports other plugins as well!
If we were just going to provide support to our own modules, we could have easily made each module as a separate component but since it supports cross compatibility, there is no telling what the markup will be. So when a module is added, details about the module is sent to the short code end point through an ajax request and the appropriate markup is generated and returned to builder as a string!
Then the markup is stored in the state and rendered instantly through a dumb component!
My problem is Some markups are as big as 20k characters and there is no telling how many modules will a user add since its a page builder!! Although I am using immutable js to maintain my state, I am skeptical about the performance!!
Should I not worry or is there any other approach better than what we are following now? Any thoughts on this will be much appreciated!
Thanks a lot for your time folks!
I have worked with DraftJS and rendering articles in React components. It is not a problem so far. Able to hold large articles in redux state. Facebook, though it does not use Redux, uses DraftJS internally and the feed usually is heavily loaded with content.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With