-
-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for Context #107
Comments
Related: #31 |
I'm contemplating whether a React-like context should be implemented in a library that shares a similar syntax with React (JSX) but is not a library itself; instead, it functions as a sophisticated template engine:
This is my current idea for adding a context-like implementation into kitajs/html. I would love to hear your opinion on this. |
First of all, I'm sorry that I have reopened this discussion again. I'll go by points:
So I'm going to scratch the context idea. An implementation that requires passing the request ID to consume the correct context is as bad as prop drilling the context. |
Awesome! Happy to see what you will achieve! |
Hi! Thanks for this library and the work you have put into it! Given your knowledge about this project it would be possible to create a "react like" context implementation?
I would love to make a PR.
I already kind of implemented something like that in this fastify plugin https://github.com/JacopoPatroclo/cose/blob/main/packages/fastify-jsx/src/lib/context.tsx but it's not convincing. It requires to handle children as a function to postpone their execution in order to give them access to the context. I'm sure there is a better way to do it. What are your thoughts @arthurfiorette ?
The text was updated successfully, but these errors were encountered: