We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
React allows to pass entire elements in props but that is not possible with react-templates.
props
react-templates
Consider for example the following template:
<Menu> <MenuItem>aubergine</MenuItem> <MenuItem>butternut squash</MenuItem> <MenuItem>clementine</MenuItem> </Menu>
in react documentation they suggest to use a Context or alternatively:
Recall that you can also pass entire React components in props if you'd like to.
Now what I propose is that we create a special tag <props> to be used like this:
<props>
<Menu> <props ref="subitems"> <MenuItem>aubergine</MenuItem> <MenuItem>butternut squash</MenuItem> <MenuItem>clementine</MenuItem> </props> </Menu>
meaning that the <MenuItem>s will be available as this.props.subitems.
<MenuItem>
this.props.subitems
The text was updated successfully, but these errors were encountered:
Closing this as it overlaps with <rt-template>.
<rt-template>
Sorry, something went wrong.
No branches or pull requests
React allows to pass entire elements in
props
but that is not possible withreact-templates
.Consider for example the following template:
in react documentation they suggest to use a Context or alternatively:
Now what I propose is that we create a special tag
<props>
to be used like this:meaning that the
<MenuItem>
s will be available asthis.props.subitems
.The text was updated successfully, but these errors were encountered: