The popular open-source contract for web professionals by Stuff & Nonsense
- Originally published: 23rd December 2008
- Revised date: March 15th 2016
- Revised by Bytes Unlimited : Feb 3rd 2020
2015-01-29 Unofficial Relay FAQ
Compilation of questions and answers about Relay from React.js Conf.
Disclaimer: I work on Relay at Facebook. Relay is a complex system on which we're iterating aggressively. I'll do my best here to provide accurate, useful answers, but the details are subject to change. I may also be wrong. Feedback and additional questions are welcome.
Relay is a new framework from Facebook that provides data-fetching functionality for React applications. It was announced at React.js Conf (January 2015).
// Finding and creating models | |
// =========================== | |
// | |
// We might need to get a reference to a model from anywhere in our code | |
// and we want to make sure that these references all point to the same model. | |
// Otherwise updates to one copy of the model won't affect another. | |
// | |
// The methods here let you get models through a wrapper that will either | |
// create the model if it doesn't exist anywhere, or return a reference to | |
// the existing model. E.g. |