react-transmit
react-transmit copied to clipboard
fix wrong order of fetchedFragments
// entry
class ArticleTags extends React.Component{
render(){
return (
<div>
<A />
<B />
</div>
)
}
}
// Commponent A
export default Transmit.createContainer(A, {
initialVariables: [],
fragments: {
dataA: () => {}
}
});
// Commponent B
export default Transmit.createContainer(B, {
initialVariables: [],
fragments: {
dataB: () => {}
}
});
When I used the above code , something wired happen: A got dataB and B got dataA. Then I looked down the source code and found this bug. Please @RickWong verify and merge.
@RickWong
@NoChapter I cannot reproduce this problem. For me A gets dataA and B gets dataB. Please provide a full example.
Here
https://github.com/NoChapter/react-isomorphic-starterkit/tree/multiContainer
This branch can reproduce the issuse.
@RickWong