Skip to content
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

Add shared context between components #33

Closed
UnexomWid opened this issue Sep 4, 2020 · 2 comments
Closed

Add shared context between components #33

UnexomWid opened this issue Sep 4, 2020 · 2 comments
Assignees
Labels
added The requested feature was added approved The request or addition was approved feature Feature request or addition

Comments

@UnexomWid
Copy link
Owner

It would be a good idea to introduce an object like context that is shared between all components. Here's an example:

eryn.render('file.eryn', { test: 'hello' }, { test2: 'This is shared' });

file.eryn

[| context.test |] // hello

[| shared.test2 |] // This is shared

[|% comp.eryn /|]  // Note that no context is passed.

comp.eryn

[| context |] // { }

[| shared.test2 |] // This is shared
@UnexomWid UnexomWid added feature Feature request or addition approved The request or addition was approved labels Sep 4, 2020
@UnexomWid UnexomWid self-assigned this Sep 4, 2020
@pebly
Copy link
Contributor

pebly commented Sep 4, 2020

This would be a really useful feature!

UnexomWid added a commit that referenced this issue Sep 6, 2020
@UnexomWid UnexomWid added the added The requested feature was added label Sep 6, 2020
@UnexomWid
Copy link
Owner Author

Added.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
added The requested feature was added approved The request or addition was approved feature Feature request or addition
Projects
None yet
Development

No branches or pull requests

2 participants