Server Side Rendering React App?

(Tbaatar) #1


I was wondering if it is possible for Matrix to render React via server side and how would it Impor the needed libraries via server side?

I just want to know if the possibility exists before going down the rabbit hole :slight_smile:


(Leo) #2

A tricky way for react integration, you can webpack your application as a JS file and then import it …

(Tbaatar) #3

Do you have working example i can see, just want to see performance speed and look under the hood the HTML it produces.


(Bart Banda) #4

I haven’t done it personally, but I know a few of our customers/users have successfully used server-side React and Vue JS libraries in Matrix to render their content with. No idea of the details though sorry.

(Tbaatar) #5

Ok, sounds great…gives me hope to try it out :slight_smile:

We’re currently having to nest / load in more and more React Apps into the page therefore a server side solution will be great. The only problem currently exists with Matrix is that you can’t create custom SLUG without a physical asset, therefore we’re stilling having to create the pages in Matrix as asset. Is this something we could potentially expect from future development of Matrix?


(Bart Banda) #6

Not planned at this point, but you can configure your proxy (nginx most likely) to do that for you, but requires custom server admin setup. I know some of our customers have done that in projects with Squiz.