kaleidawave / prism

(No longer in development). Experimental compiler for building isomorphic web applications with web components.
MIT License
110 stars 1 forks source link

SSR data parameter of layouts #13

Open kaleidawave opened 4 years ago

kaleidawave commented 4 years ago

Currently a layout component (Denoted with @Layout decorator) can have a state on the frontend. It inherits from Component and its markup is subject to the same templating binding and reactivity that any other component is subject to.

The problem arises around server side rendering pages that use a layout which has data. The component should append its inherited layout parameter to its own parameters.

Issue is around: https://github.com/kaleidawave/prism/blob/9f76e8b7c3ebeaa811144cc5b587136d28d3bd1f/src/component.ts#L677

There is also a opportunity here to refactor the way client global parameters work in the same way.