You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Purpose: Sets context of request by providing a context specific object which components can attach data to. This would then be passed into the render function to basically allow context specific data to be shared across components.
Good use case: we want specific ad injection logic defined on the layout level to be respected by an article. A component in the layout contains the specification of the logic, attaches it to ctx, and then the article can read it. Also ,maybe some dedupe logic in feeds?
Updating this for the naming. Should be called beforeRender.
"also minor side point: I think beforeRender is a better name because it's a more conventional name for a lifecycle hook; prerender is a verb; before/after/on are events" - @rmfarrell
Idea:
preRender
hook inmodel.js
Purpose: Sets context of request by providing a context specific object which components can attach data to. This would then be passed into the
render
function to basically allow context specific data to be shared across components.Good use case: we want specific ad injection logic defined on the layout level to be respected by an article. A component in the layout contains the specification of the logic, attaches it to
ctx
, and then the article can read it. Also ,maybe some dedupe logic in feeds?Example:
Not settled, but just putting something down.
The text was updated successfully, but these errors were encountered: