-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Labels
Description
Hi @Amine-H I like the new release, the helpers look clean 👍
There is a little issue, Show supports only returning one element.
This will not work:
<Show if={true}>
<ProjectItem />
<p>Other element</p>
</Show>
React 16 supports this with Fragments, not sure if it will create compatibility issues with projects using older versions.
export default (props) => {
const { if: visible, children } = props;
if(visible){
return <React.Fragment> {children} </React.Fragment>
}
return null;
}
Let me know if you have some solutions in mind.
Amine-H and hadar-ayoub