Open Twisterking opened 7 years ago
This is on the list. Just haven't gotten to it yet. Happy to accept a PR if you'd like to take a swing at it!
Would it be better to switch to using createContainer() instead, as you've shown in https://themeteorchef.com/tutorials/using-create-container?
I would maybe also suggest to switch to createContainer()
, especially as Kadira is closing down and thus also the support for any libraries they created is declining. So maybe it is better to stick to an "MDG in-house solution"?!
@Twisterking I've considered this for the exact reasons you've outlined. The gotcha is that createContainer()
doesn't allow us to set any options, specifically turning off pure rendering. This is needed because otherwise there's (or at least, was) a bug with React Bootstrap where the navigation active state wouldn't update.
specifically turning off pure rendering. This is needed because otherwise there's (or at least, was) a bug with React Bootstrap where the navigation active state wouldn't update.
Was there an issue created for this and if so, has it been solved?
I'm not certain. I vaguely recall submitting an issue on this, but it was/has been fairly low priority. It seems like one of the workarounds may have improved (https://github.com/react-bootstrap/react-router-bootstrap) but I haven't tried it.
Doesn't createContainer have an option to turn off pure rendering?
@stubailo I haven't checked recently but when I first attempted it there wasn't. Checked the source and it was hard-coded. If there's an option that would close this up quick.
If you send a PR I'd be happy to merge and release right away! I think the variety of different ways to use React in Meteor is pretty confusing to people and it's a shame to let something that can be changed so easily make the difference.
@stubailo playing hot potato, son! This sounds like it's best handled by MDG :) If I can find some time I'll take a peek.
Alright, up to you! Personally I think react-komposer is much more confusing for people to use, but of course that's a matter of opinion.
I completely agree with @stubailo! Just today I used both solutions and MDGs createContainer()
makes much more sense to me.
btw: Can someone explain to me what exactly "pure rendering" is?!
@Twisterking pure rendering is a performance optimization for React - it says that the component should not re-render unless its props or state change.
I think some libraries do sketchy stuff like using setState
and then mutating the object and expecting it to render again, but that's not really a recommended way to use React IMO.
Hi there!
I am currently revamping the UI layer of my production app and switching from Blaze to React. So I kind of started over with your base. It occurred to me that you guys are still using the 1.13 version of
react-komposer
. I am using this is because of the lack ofcomposeWithTracker
? Is there any way around this? Maybe providing a helper function which uses something like explained here? I am really a React noob, so maybe someone experienced can patch this in somehow so we can use the V2.0 of react-komposer?!On a side note: Why are you not using the vanilla
react-meteor-data
package?best, P