+
+ {user.age}
+
+ {/* Render child component, passing the _fragment reference_: */}
+
+
+ >
+ );
+}
+
+module.exports = UserComponent;
+```
+
+There are a few things to note here:
+
+* `UserComponent` both renders `UsernameSection`, *and* includes the fragment declared by `UsernameSection` inside its own `graphql` fragment declaration.
+* `UsernameSection` expects a *fragment reference* as the `user` prop. As we've mentioned before, a fragment reference is an object that Relay uses to *read* the data declared in the fragment definition; as you can see, the child `UsernameSection_user` fragment itself just declares fields on the `User` type, but we need to know *which* specific user to read those fields from; this is what the fragment reference corresponds to. In other words, a fragment reference is like *a pointer to a specific instance of a type* that we want to read data from.
+* Note that in this case the `user` passed to `UsernameSection`, i.e. the fragment reference, *doesn't actually contain any of the data declared by the child `UsernameSection` component*; instead, `UsernameSection` will use the fragment reference to read the data *it* declared internally, using `useFragment`.
+ * This means that the parent component will not receive the data selected by a child component (unless that parent explicitly selected the same fields). Likewise, child components will not receive the data selected by their parents (again, unless the child selected those same fields).
+ * This prevents separate components from *even accidentally* having implicit dependencies on each other. If this wasn't the case, modifying a component could break other components!
+ * This allows us to reason locally about our components and modify them without worrying about affecting other components.
+ * This is known as [*data masking*](../../../principles-and-architecture/thinking-in-relay/).
+* The *fragment reference* that the child (i.e. `UsernameSection`) expects is the result of reading a parent fragment that *includes* the child fragment. In our particular example, that means the result of reading a fragment that includes `...UsernameSection_user` will be the fragment reference that `UsernameSection` expects. In other words, the data obtained as a result of reading a fragment via `useFragment` also serves as the fragment reference for any child fragments included in that fragment.
+
+
+## Composing Fragments into Queries
+
+Fragments in Relay allow declaring data dependencies for a component, but they ***can't be fetched by themselves***. Instead, they need to be included in a query, either directly or transitively. This means that *all fragments must belong to a query when they are rendered*, or in other words, they must be "rooted" under some query. Note that a single fragment can still be included by multiple queries, but when rendering a specific *instance* of a fragment component, it must have been included as part of a specific query request.
+
+To fetch and render a query that includes a fragment, you can compose them in the same way fragments are composed, as shown in the [Composing Fragments](#composing-fragments) section:
+
+```js
+/**
+ * UserComponent.react.js
+ *
+ * Fragment Component
+ */
+
+import type {UserComponent_user$key} from 'UserComponent_user.graphql';
+
+const React = require('React');
+const {graphql, useFragment} = require('react-relay');
+
+type Props = {
+ user: UserComponent_user$key,
+};
+
+function UserComponent(props: Props) {
+ const data = useFragment(
+ graphql`...`,
+ props.user,
+ );
+
+ return (...);
+}
+
+module.exports = UserComponent;
+```
+
+```js
+/**
+ * App.react.js
+ *
+ * Query Component
+ */
+
+import type {AppQuery} from 'AppQuery.graphql';
+import type {PreloadedQuery} from 'react-relay';
+
+const React = require('React');
+const {graphql, usePreloadedQuery} = require('react-relay');
+
+const UserComponent = require('./UserComponent.react');
+
+type Props = {
+ appQueryRef: PreloadedQuery