RickWong/react-transmit

Initial Variables required unnecesarily

オープン

#57 opened on 2016/02/12

 (3 件のコメント) (0 件のリアクション) (0 人の担当者)JavaScript (61 件のフォーク)batch import
help wanted

Repository metrics

Stars
 (1,306 個のスター)
PR merge metrics
 (30d に merged PR はありません)

説明

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 the isRootContainer property of the Container is false, which in my case was because I hadn't declared initialVariables (https://github.com/RickWong/react-transmit/blob/master/src/lib/createContainer.js#L30). Once I set initialVariables 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.

コントリビューターガイド