So what about context #33
-
Atm we're calling the object that gets passed through a render cycle "context". But what is context?
Things added to context during a render cycle:
👉 This context object could be valuable real estate for other plugins or utils to be added to as well. Open questions:
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Maybe the answer here is to make it explicit and not try to be clever... What everything shared an object like this, and we referred to it as "props" to clear the way for "context" to be a separate shared bucket for plugins and stuff? const props = {
path: '/about',
params: {}, // route params
query: {}, // query params
lambda: {
event: { ...headers }, // full lambda event
context: {}, // lambda context
},
context: {}, // SHARED
plugins: { head } // place to attach plugins, which are passed the context object
} |
Beta Was this translation helpful? Give feedback.
-
I think we've got a good thing going here now as of #35 |
Beta Was this translation helpful? Give feedback.
I think we've got a good thing going here now as of #35