Skip to content
This repository has been archived by the owner on May 17, 2019. It is now read-only.

Provide additional ctx for RenderToken #286

Merged
merged 2 commits into from
Sep 7, 2018
Merged

Conversation

revskill10
Copy link
Contributor

@revskill10 revskill10 commented Sep 6, 2018

We should provide additional ctx for the custom renderer could have additional control logic.

@revskill10 revskill10 closed this Sep 6, 2018
@lhorie
Copy link
Contributor

lhorie commented Sep 6, 2018

I actually feel like this could/should be looked at separately from #285, which is a bigger change

@revskill10 revskill10 reopened this Sep 6, 2018
@revskill10 revskill10 changed the title Provide additional ctx for renderToken Provide additional ctx for RenderToken Sep 6, 2018
@lhorie lhorie added the feature label Sep 6, 2018
@lhorie
Copy link
Contributor

lhorie commented Sep 6, 2018

Rationale: non-react view libraries might not expose a context-like API, so there needs to be some way of determining request data from render for e.g. routing purposes. Custom renderers may also need to have access to ctx for various reasons (e.g. streaming rendering)

@revskill10
Copy link
Contributor Author

@lhorie Could you give me one example of that use case when we need to check ?

@lhorie lhorie merged commit dc35dc9 into fusionjs:master Sep 7, 2018
@lhorie
Copy link
Contributor

lhorie commented Sep 7, 2018

For example, if you want to conditionally render from a set of components based on the url, or based on the existence of a cookie

akre54 pushed a commit to akre54/fusion-core that referenced this pull request Dec 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants