O'Reilly logo

React and React Native by Adam Boduch

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Rendering todo items

It's the job of the TodoList component to render items todo list. When AddTodoMutation takes place, the TodoList component needs to be able to render this new item. Relay takes care of updating the internal data stores where all of our GraphQL data lives. Here's a look at the item list again, with several more todos added:

Rendering todo items

Here's the TodoList component itself:

import React, { PropTypes } from 'react'; import Relay from 'react-relay'; import { View } from 'react-native'; import Todo from './Todo'; // The list component itself is quite simple. Note the // property that we're using to iterate over - there's // "edges" and "nodes". ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required