[Feature]: Improve syntax / grammar of contexts #225
Closed
FabianHummel
started this conversation in
Ideas
Replies: 2 comments
-
|
Another great way to have that is to efficientyly achieve:
`const __slot_MyContext = null; component Child() { component Parent() { __ctx.push(__slot_MyContext, "Hello from context!"); |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
We're not going to go down the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Feature Category
Syntax/Language Improvement
Problem Statement
Ripple is looking really promising and I like the way it's using new keywords like
componentto better integrate the concept of UI with traditional Typescript. However, I think Contexts look very React-like and waste potential to be an outstanding and unique feature of Ripple.Proposed Solution
I though of something like shown in the code snippet below (example taken from the README). Notice the use of a new keyword
contextanduse. An added benefit is that this also removes the need for importing the function alltogether.Alternatives Considered
I am open for alternatives, but I'd love to see contexts move into a direction I initially stated.
Examples & References
No response
Checklist
Beta Was this translation helpful? Give feedback.
All reactions