From 4abdd560dcd250681aae09a9579a6bbf1a902cf9 Mon Sep 17 00:00:00 2001 From: Andrew McCloud Date: Tue, 8 Nov 2016 18:58:41 -0800 Subject: [PATCH] Add create-react-app tip to react login quickstart --- articles/client-platforms/react/_includes/_login.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/articles/client-platforms/react/_includes/_login.md b/articles/client-platforms/react/_includes/_login.md index d413b8a65f..cb0ea70c11 100644 --- a/articles/client-platforms/react/_includes/_login.md +++ b/articles/client-platforms/react/_includes/_login.md @@ -1,3 +1,11 @@ +::: panel-info Tip +Use [`create-react-app`](https://github.com/facebookincubator/create-react-app) with `auth0-react-scripts` to create a React application with authentication. + +```sh +create-react-app my-app --scripts-version auth0-react-scripts +``` +::: + ## 1. Create an AuthService Class The best way to have authentication utilities available across your application is to create a helper class. With the class in place, you can share an instance of it by passing it as a prop. @@ -136,7 +144,7 @@ For this to work, `auth` needs to be included as a prop, which can be done from ## 4. Send `auth` from Router to Container Children -To use the `auth` parameter in various child components, it needs to be propagated down from from the `Container` component. +To use the `auth` parameter in various child components, it needs to be propagated down from from the `Container` component. ```javascript // ./src/views/Main/Container.js @@ -166,4 +174,4 @@ export class Container extends React.Component { } export default Container; -``` \ No newline at end of file +```