This repository has been archived by the owner on Mar 15, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 62
Initial Variables required unnecesarily #57
Labels
Comments
It's really a lack of API design. I know. You guys have any suggestions to make it better? |
Console warnings (though I've been reading they aren't portable) and something in the docs might be useful. I won't be available for a couple of days so that is as much help as I can give. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
First of all, nice project! I want to point out an issue I found recently. I tried implementing this in one of my projects but the Container wouldn't render so I ended up tracing the error to the
componentWillMount
lifecycle method of the Container, specifically to this line: https://github.com/RickWong/react-transmit/blob/master/src/lib/createContainer.js#L239. Going down that function call I noticed that this function returns false if theisRootContainer
property of the Container is false, which in my case was because I hadn't declaredinitialVariables
(https://github.com/RickWong/react-transmit/blob/master/src/lib/createContainer.js#L30). Once I setinitialVariables
to{}
it worked as expected, but in my humble opinion that should have been uneccesary as I don't use any variables in my fragment functions. Or is this behaviour intended?EDIT: Even if this behaviour is intended I don't think it should fail silently.
The text was updated successfully, but these errors were encountered: