RickWong / react-transmit

Relay-inspired library based on Promises instead of GraphQL.
BSD 3-Clause "New" or "Revised" License
1.32k stars 61 forks source link

Omit initialVariables render nothing #49

Closed gutenye closed 8 years ago

gutenye commented 8 years ago

Given

Transmit.createContainer(App, {
  // initialVariables: {}  // without it
  fragements: { ... }
})

The page does not render anything, nor any errors.

RickWong commented 8 years ago

I really need to document this somewhere. Containers with initialVariables are so-called "root containers" and their fragments are fetched at start. Containers without initialVariables will never be automatically fetched. It's by design.

ghost commented 8 years ago

Is this concept of "root containers" new with version three of Transmit? Have its definition and requirements been documented yet? Thank you.