I’m currently trying to implement a SSR SPA with BloomReach React SDK editable by BloomReach’s Channel Manager.
First thing to notice; i was not able to render CONTAINER_COMPONENT’s with react since the SDK (container.js) uses React.Fragment (in non-preview mode) and renders all its children inside of it. The container components i’ve defined within the console do have a purpose, for example defining the layout (main / sidebar). So i needed a way to add the SidebarContainer / MainContainer to the componentDefinitions list in order to be rendered. I’ve created a pull request for this: https://github.com/bloomreach/experience-react-sdk/pull/20
Now the containers can be rendered through React, i run into another big issue, which i couldn’t resolve in a nice way; How can i change the sort order of those container components within the Channel Manager? If i use the non-SPA implementation, the containers are defined within the free marker templates with <@hst.include ref=“mycontainer” /> which defines the order of rendering.
BloomReach React SDK renders all components with the returned from the Page Model. But the sort order of those containers in the Page Model are hard to sort (no drag & drop functionality for container components). Now the only way to solve ordering is to open the console and remove containers and insert them into the right order. This means i can lost all data and the task is cumbersome.
Can anybody help me with this one? Thanks in advance!