-
Notifications
You must be signed in to change notification settings - Fork 517
wip: Cookies issue and payload provider #67
Conversation
Implement basic cookie pushing from server to boot function. Also refactor a little bit prerender process to enable payload passing from server request to boot function also (related to issue #68) |
Hey @laskoviymishka, great work!
|
Hi @angelyordanov, thx for feedback
This is still in progress, so any feedback is highly appreciated. |
I tried to imagine what would an Anyway, if one wants to do that he can just copy the So, You are right, the |
- Introduce prerenderer interface - Extract classes to separate files - Remove static accessor to prerenderer - Clean prerender options - Remove magic callback setter to prior manual population of args - Add basic payload population for sample
Refactor prerenderer a little bit:
So now basic setup is not require add node services anymore, but you could modify some prerendering options with following code in your startup:
Also not it much easier to pass some data from server direct to your boot JS function. Here is sample:
In this callback scope there avaible service provider and http context object, so it could be pretty easy to extract this population to somekind of service. Here is sample:
Folks, any thoughts on this? |
Merge rc2 upgrade into this quite painfull, better to recreate it as new PR. |
how to use this addPrerender it says the addPrerender does not exist thanks |
This pr was not merged and proposed api is not in mainline yet |
oh no...im stuck right now passing cookie to my api controller during SSR do you have any solutions? thanks |
There is a solution but with a slightly different api. It should be described in docs page |
thanks i was trying to pass it in my redux state by using this code
but when the time i retrieve... it doesnt change the value when doing SSR please help huhuhuhu |
@laskoviymishka please help me sir |
You should use |
On client side there is
Object available. This object may contain your HttpContext.Request.Cookies |
Work in progress.
Created basic sample for reproducing issue #66 also some refactor to #68.