This repository was archived by the owner on Mar 15, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 61
Parameters in fragments never get updated. #64
Copy link
Copy link
Open
Description
They always seem to be stuck on their initialVariables values (a problem we didn't have in the previous major version of Transmit). And I'm a little at a loss at to how to update them, as the docs' example code appears to be out of date?
react-transmit/src/example/Newsfeed.js
Lines 50 to 73 in c0266b0
export default Transmit.createContainer(Newsfeed, { /** * Default query params. */ queryParams: { currentNewsfeed: [], nextStoryId: 1 }, queries: { /** * The "newsfeed" query will concatenate the next Story to the current newsfeed, and returns * the updated newsfeed in a Promise. */ newsfeed (queryParams) { return ( Story.getQuery( "story", {storyId: queryParams.nextStoryId} ).then((nextStory) => { return queryParams.currentNewsfeed.concat([nextStory]); }) ); } } }); react-transmit/src/example/Newsfeed.js
Line 14 in c0266b0
const newsfeed = this.props.newsfeed; react-transmit/src/example/Newsfeed.js
Line 37 in c0266b0
nextStoryId: this.props.queryParams.nextStoryId + 1
Where do the invocations of each function in the fragments object of createContainer get their parameters (their input values)?
Thank you.
Metadata
Metadata
Assignees
Labels
No labels