{"action":"closed","issue":{"url":"https://api.github.com/repos/facebook/react/issues/4697","labels_url":"https://api.github.com/repos/facebook/react/issues/4697/labels{/name}","comments_url":"https://api.github.com/repos/facebook/react/issues/4697/comments","events_url":"https://api.github.com/repos/facebook/react/issues/4697/events","html_url":"https://github.com/facebook/react/issues/4697","id":102795499,"number":4697,"title":"How to 'unfold' children ?","user":{"login":"gre","id":211411,"avatar_url":"https://avatars.githubusercontent.com/u/211411?v=3","gravatar_id":"","url":"https://api.github.com/users/gre","html_url":"https://github.com/gre","followers_url":"https://api.github.com/users/gre/followers","following_url":"https://api.github.com/users/gre/following{/other_user}","gists_url":"https://api.github.com/users/gre/gists{/gist_id}","starred_url":"https://api.github.com/users/gre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gre/subscriptions","organizations_url":"https://api.github.com/users/gre/orgs","repos_url":"https://api.github.com/users/gre/repos","events_url":"https://api.github.com/users/gre/events{/privacy}","received_events_url":"https://api.github.com/users/gre/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-08-24T13:41:21Z","updated_at":"2015-08-24T16:40:14Z","closed_at":"2015-08-24T16:40:14Z","body":"Hi,\r\n\r\nI'm writing a library which uses JSX as an abstract DSL, a bit like `react-router` have `<Router/>` and `<Route />`, or a bit like `react-canvas` have `<Surface />` and others primitives.\r\n\r\n**To explain my question, I will take the example of `react-router`:**\r\n\r\nAn user could define a CustomRoute component that render() to a `<Route>`. \r\n\r\nand use it like this:\r\n\r\n```\r\n<Router>\r\n  <CustomRoute>\r\n</Router>\r\n```\r\n\r\nAFAIK This won't be detected by the `<Router/>` , because just traversing the props.children is not enough (router will see a `child.type==CustomRoute`, and won't understand it).\r\n\r\n**Do you know if this is possible to solve this?**\r\nBasically I want to descent the render() tree, and stop if it is not a user component (== it is a native component like `<div/>`), or if I reach the `<Route />` I'm looking for."}}