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

Extend BriskRoute#render macro to accept callback for data #58

Open
joshmanders opened this issue Mar 11, 2024 · 0 comments
Open

Extend BriskRoute#render macro to accept callback for data #58

joshmanders opened this issue Mar 11, 2024 · 0 comments
Labels
component:view Pertains to the kubit/view component status:accepted We have accepted this request and plan to do it but aren't sure when type:feature New feature or request

Comments

@joshmanders
Copy link
Member

Right now you can do Route.on('foo').render('bar', data); and it will work, but it would be nice to shorten

Route.get('foo', ({ view }) => {
  const data = await getData();

  return view.render('bar', data);
});

Into a BriskRoute method like this

Route.on('foo').render('bar', getData);
@joshmanders joshmanders added type:feature New feature or request component:view Pertains to the kubit/view component status:accepted We have accepted this request and plan to do it but aren't sure when labels Mar 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:view Pertains to the kubit/view component status:accepted We have accepted this request and plan to do it but aren't sure when type:feature New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant