-
Notifications
You must be signed in to change notification settings - Fork 9
pipeline
Request get passed to the router. Pellet will create a isomorphic router for the server and browser environments. In the server environment if your page/layout/route component has a static componentConstruction method it will create a pipeline. This allows pellet to fetch and setup any data needed before rendering.
In side of the componentConstruction method pellet will expose a handful of methods that match react functions and the pellet mixins functions. For example this.setProps will update the pipelines version of props. In addition pellet creates isolated data that is isolated to each request. This allows private unshared data to be passed around while pellet is executing code in componentConstruction. This is very much the same as having a nodejs req,res object passed around to each function. You can get it via this.getIsolatedConfig().
The isolatedConfig is passed to coordinator so the private data is accessible inside of coordinators. This lets your coordinators to access this data via this.isolatedConfig.
NOTE: in the browser the isolatedConfig is shared, because it is technically all the same request. On the server each request gets a new unique isolatedConfig.