-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
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
Reactochart Breaks with Fragments as Children #174
Comments
Hey @ekh64 thanks for filing! Would you be able to dive deeper into your use case and what you're using fragments for? Are you hoping to do something like this?
|
Exactly, or more specifically: <XYPlot>
<MyComponent />
<XYPlot> where function MyComponent(...props) {
return (<Fragment>
<ReactochartComponentA />
<ReactochartComponentB />
</Fragment>)
} I've since found that if I pass through |
+1 to this, this is a feature we used to support a long time ago; it got dropped in one of the rewrites and I've always felt that it would be worth returning to and getting working again. This is not just an issue with The reason for this is because In order to support having other layers of wrappers/fragments in between Additionally, after the Hope this makes sense... Just wanted to get my thought process written down as this is something I've thought about before. :) |
In a recent meet up internally I proposed a halfway solution using some kind of reactochart fragment that would do some of what resolveXYScales is doing but then expose its own children's results up to resolveXYScales. It'd allow folks to use nesting like fragments etc (as folks are wont to do), while also making it an explicit move (avoiding needless tree pathing) |
^ yeah, I think this is a reasonable path too @scottsheffield - ie. Reactochart provides a generalized wrapper component or HOC, which implements |
It'd be amazing if Reactochart could handle
Fragments
in some way. Currently if you pass in a component withFragments
, it doesn't render properly and the entire visualization breaks.The text was updated successfully, but these errors were encountered: