Skip to content

Instantly share code, notes, and snippets.

@d6u
Last active February 26, 2016 15:55
Show Gist options
  • Select an option

  • Save d6u/c9cb8f11e3ab096d9e27 to your computer and use it in GitHub Desktop.

Select an option

Save d6u/c9cb8f11e3ab096d9e27 to your computer and use it in GitHub Desktop.
var someProps = {
propA: {
id: 123,
},
// propB: {}, no available now
};
<ObjectExplore explore={someProps}>
<Path lookFor='propA' renderComponent={ComponentA} /> // ComponentA will have access to {id: 123} when instantiated
<Path lookFor='propB' renderComponent={ComponentB} /> // Won't get rendered since 'propB' is not available
</ObjectExplore>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment