- What is React Router v4
- Explain what the BrowserRouter component is for
- Explain what the Link component is for
- Explain what Router and Miss components are for
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
[ | |
"usdaplants_table", | |
"characteristics_20160713_table", | |
"usda_plants_20160713_table" | |
], [ | |
"id", | |
"betydb.species.id", | |
"Genus", | |
"Species", |
We are describing some scenarios that involve tapping into the component lifecycle:
- You want to make a request to fetch the user's orders when you are ready to display the orders table (a component).
- You want to detect when a search field has changed to trigger a new search request.
- You are filtering a set of cities in the United States based on search in your
render
method. For performance reasons, you only want to render when the search field has changed. - You want to display a new flashcard on the screen but you want to use a CSS transition to make what's currently there fade out.
- You need to initialize a UI component from a third party (think Materialize, chart.js, d3) once it is loaded.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import { Input, Select, Option, Label } from '../assets/styled-components/forms.js'; | |
class Address extends React.Component { | |
render() { | |
return ( | |
<section> | |
<h3>Address Component</h3> | |
<Label fullwidth >Street 1: | |
<Input type="text" fullwidth /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ---------------------------------------------------------------------------- | |
// | |
// | |
// ___ ___ ___ | |
// / /\ ___ / /\ /__/\ | |
// / /::\ / /\ / /:/_ | |::\ | |
// / /:/\:\ / /:/ / /:/ /\ | |:|:\ | |
// / /:/~/:/ / /:/ / /:/ /:/ __|__|:|\:\ | |
// /__/:/ /:/___ / /::\ /__/:/ /:/ /__/::::| \:\ | |
// \ \:\/:::::/ /__/:/\:\ \ \:\/:/ \ \:\~~\__\/ |
Arduino code for photocell sensor.
#define CDS_INPUT 0
void setup() {
Serial.begin(9600);
}
- humidy sensor that turns on fan when you shower
- motion sensor that triggers different services based on time of day
- Morning:
- shows weather icons/data while you get ready.
- turns on morning soundtrack.
- sends out signal to other "morning" services to start up.
- Night:
- Morning:
- turns on sense_hat LEDs to red to light up bathroom without blowing out your eyes.