zalando / tailor

A streaming layout service for front-end microservices

Home Page:http://www.mosaic9.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Load a fragment on page ahead of other fragments

kanhery opened this issue · comments

Hello,
I have created a react-redux application using node-tailor. In one of my fragments I create redux store , save it as windows variable and access it in all other fragments.
My requirement is to load this fragment first on the page and then other fragments, so that store is available to all the fragments. Please let me know if this is possible. Thanks !

You can just add the fragment in the head and do not use async attribute, Fragments are streamed to the browser in the order they are declared in the template so it should work without any issues.

Let me know if you can't make it work.

Thank you for response. I can see that setting it up this way helps in loading my wrapper component ahead of other components. Not sure why my store (created in wrapper component) is still inaccessible to other components , at times. Need to check from react perspective i think. Thanks !