One thing that I found weird when writing the Tabs component, is that the props on children components coming from Dash are not available on props.children[0].props(for example, where props.children[0] is a Tab component for instance), but on props.children[0].props.children.props. I've went around this by having some logic saying "if child.props.children exists, the props are coming from Dash, otherwise they're coming from Demo.js", but that causes weirdness when, in JS (Demo.js or perhaps a unit test), you set children on a <Tab/>, causing the logic to pick that up as "oh, these are coming from Dash" and using the child.props.children.props which is then not the props we want!
Hope this makes sense!
One thing that I found weird when writing the
Tabscomponent, is that the props on children components coming from Dash are not available onprops.children[0].props(for example, whereprops.children[0]is aTabcomponent for instance), but onprops.children[0].props.children.props. I've went around this by having some logic saying "if child.props.children exists, the props are coming from Dash, otherwise they're coming from Demo.js", but that causes weirdness when, in JS (Demo.js or perhaps a unit test), you setchildrenon a<Tab/>, causing the logic to pick that up as "oh, these are coming from Dash" and using thechild.props.children.propswhich is then not the props we want!Hope this makes sense!