Add instructions for installing React

This commit is contained in:
unicodeveloper
2018-10-18 10:06:53 +01:00
committed by Peggy Rayzis
parent 1a9af7dc3d
commit b1627a43c3

View File

@@ -71,7 +71,13 @@ Let's connect our client to React.
<h2 id="react-apollo">Connect your client to React</h2>
React is the choice of framework for our UI frontend in this tutorial.
React is the choice of framework for our UI frontend in this tutorial. Install React using `create-react-app` via `npx`:
```bash
npx create-react-app frontend
```
Now, let's connect Apollo Client to our React app.
To connect Apollo Client to React, you will need to invoke the `ApolloProvider` component exported from the `react-apollo` package. The `ApolloProvider` component is similar to Reacts context provider. It wraps your React app and places the client on the context, which allows you to access it from anywhere in your component tree.