export const fetchCoWorkers = async () => {
const url = 'http://localhost:3001/api/v1/coworkers'
const response = await fetch(url);
if (!response.ok) {
throw new Error('There was an error getting your co-workers.');
}
const coWorkers = await response.json();
return coWorkers
}
install after react:
npm i redux react-redux redux-devtools-extension -S
Add the correct imports to index.js
import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
Edited and formatted by ericwm76
Eric's gist https://gist.github.com/ericwm76/e1204fc03f14af4429add8225ff55f71
Creating a React App
- In the terminal run
npx create-react-app NAMEOFYOURAPP
- Cd into the new directory:
cd NAMEOFYOURAPP
- Run
npm install
. - You can run
npm start
to see if the app was set up correctly.
It's important to remember why we use JSON and localStorage -- formatting and saving data on the user's computer, via the WebStorage API.
localStorage
gives us access to a storage object in the browser (go ahead and try calling localStorage
in the console. We get an object back!)
This object gives us access to a few methods, such as:
localStorage.setItem([key],[value])
=>undefined
localStorage.getItem([key])
=>"[value]"
(as a string)
The assignments listed here should take you between 1.5 and 2 total hours.
To start this assignment:
- Click the button in the upper right-hand corner that says Fork. This is now your copy of the document.
- Click the Edit button when you're ready to start adding your answers.
- To save your work, click the green button in the bottom right-hand corner. You can always come back and re-edit your gist.
The assignments listed here should take you approximately 25 total minutes.
To start this assignment, click the button in the upper right-hand corner that says Fork. This is now your copy of the document. Click the Edit button when you're ready to start adding your answers. To save your work, click the green button in the bottom right-hand corner. You can always come back and re-edit your gist.
Need help? You can go back to the files/directories portion of the lesson here.
The readings and responses listed here should take you approximately 20 minutes total.
To start this assignment:
- Click the button in the upper right-hand corner that says Fork. This is now your copy of this document.
- Click the Edit button when you're ready to start adding your answers.
- To save your work, click the green button in the bottom right-hand corner. You can always come back and re-edit your gist.
The assignments listed here should take you approximately 2 hours.
To start this assignment, click the button in the upper right-hand corner that says Fork. This is now your copy of the document. Click the Edit button when you're ready to start adding your answers. To save your work, click the green button in the bottom right-hand corner. You can always come back and re-edit your gist.
Documentation of a langauge, framework, or tool is the information that describes its functionality. For this part of the practice tasks, you're going to practice digging into documentation and other reference material.
The readings and responses listed here should take you approximately 60 minutes.
To start this assignment, click the button in the upper right-hand corner that says Fork. This is now your copy of this document. Click the Edit button when you're ready to start adding your answers. To save your work, click the green button in the bottom right-hand corner. You can always come back and re-edit your gist.
1. Learning Fluency by Turing alum Sara Simon (30 min)
- Your key take-aways OR how you're going to implement specific points (minimum 3):
- I actually identify a lot with this piece. First, I never thought I'd end up in anything STEM related. I was mostly fine with science and math (except chemistry) but I have always been a language/writing/social science person. Like the author, though, I have learned different languages and the one I succeeded at and have attained some sembl