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

Introduce the <function> tag for declaring JavaScript functions #405

Closed
patrick-steele-idem opened this issue Nov 7, 2016 · 2 comments
Closed
Assignees
Labels
type:feature A feature request
Milestone

Comments

@patrick-steele-idem
Copy link
Contributor

function formatCurrency(value) {
  return '$' + value.toFixed();
}

render()
  <div>Total: ${formatCurrency(10}</div>
@patrick-steele-idem patrick-steele-idem added this to the 4.0 milestone Nov 7, 2016
@patrick-steele-idem patrick-steele-idem added the type:feature A feature request label Nov 7, 2016
@philidem
Copy link
Member

philidem commented Nov 7, 2016

I'm not a fan of the render() call in sample above

@philidem
Copy link
Member

philidem commented Nov 7, 2016

Also, we will probably need to support functions that get instantiated once and functions that are declared inline (so that you can better utilize function closure for accessing local variables).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:feature A feature request
Projects
None yet
Development

No branches or pull requests

2 participants