[codorial] WIP Add more config items

This commit is contained in:
Elliot Hesp 2018-02-28 17:46:38 +00:00
parent 1283320997
commit 7e952a8564
4 changed files with 6 additions and 4 deletions

View File

@ -1,5 +1,7 @@
{
"title": "Authentication with Firebase",
"description": "Create a React Native app from scratch, implementing authentication with react-native-firebase. This Codorial covers navigation, firebase, redux and more!",
"tags": ["react-native", "redux", "react-redux", "firebase", "firebase-auth", "react-native-firebase", "react-navigation"],
"steps": [
{
"title": "Getting Started",

View File

@ -40,13 +40,13 @@ export default createStore(reducer);
A reducer is a simple JavaScript function which takes two arguments: `state` & `action`. The idea of a reducer is to take "some data" from an `action`
and return new state.
- `state` is any sort of data which cannot be altered (immutable). A reducer must return a new value each time.
- `state` is any sort of data, which cannot be altered (immutable). A reducer must return a new value each time. More on this later.
- `action` is an object containing a `type`, and any unreduced data. More on this later.
## Integrating Redux into the app
Our Redux store is now ready to be used. `react-redux` provides us with a `Provider` component which "provides" any children
with access to the store via [context](https://reactjs.org/docs/context.html). Luckily we don't need to worry about this too much as the lirbary
with access to the store via [context](https://reactjs.org/docs/context.html). Luckily we don't need to worry about this too much as the library
takes care of the hard work!
Back within our original bootstrap file, we'll wrap the `App` component in the `Provider` component, so our business logic has access to Redux.

View File

@ -5,7 +5,7 @@ an opinionated guide to how this might look, which will work across both Android
## Entry file
Every fresh React Native project contains to key files, an `index.android.js` & a `index.ios.js` files which currently individually render a simple React component
Every fresh React Native project contains two key files, an `index.android.js` & a `index.ios.js` files which currently individually render a simple React component
with basic styling. Rather than having two separate files, we're going to create a single file so both Android & iOS use it.
We'll achieve this by creating a `src` directory where our own code for the app will live. Create the directory with an `index.js` file, so your

View File

@ -85,7 +85,7 @@ firebase.auth().signInWithEmailAndPassword('jim.bob@gmail.com', 'supersecret!')
console.log('Existing User', user);
})
.catch((error) => {
console.error('Woops, something went wrong!, error);
console.error('Woops, something went wrong!', error);
});
```