This file contains hidden or 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, { Component } from 'react'; | |
| class Forecast extends Component { | |
| render(){ | |
| return( | |
| <div> | |
| <h1>yooooo</h1> | |
| </div> |
This file contains hidden or 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, { Component } from 'react'; | |
| import WeatherFetcher from '../utils/WeatherFetcher'; | |
| class Forecast extends Component { | |
| constructor() { | |
| super(); | |
| this.state = { | |
| loaded: false | |
| } |
This file contains hidden or 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, { Component } from 'react'; | |
| import WeatherFetcher from '../utils/WeatherFetcher'; | |
| import {Grid, Row} from 'react-bootstrap'; | |
| import DayWeather from './DayWeather'; | |
| //Require moment to create dates for the forecast. | |
| import moment from 'moment' | |
This file contains hidden or 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, { Component } from 'react'; | |
| import { Col} from 'react-bootstrap'; | |
| import { browserHistory } from 'react-router'; | |
| class DayWeather extends Component { | |
| constructor() { | |
| super(); | |
| this.handleClick = this.handleClick.bind(this) | |
| } | |
| handleClick() { |
This file contains hidden or 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 ReactDOM from 'react-dom'; | |
| import App from './App'; | |
| import './index.css'; | |
| import Home from './components/home'; | |
| import Detail from './components/detail'; | |
| //require the component forecast for our | |
| ///forecast/:city path | |
| import Forecast from './components/forecast'; |
This file contains hidden or 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, { Component } from 'react'; | |
| // import '../css/Detail.css'; | |
| class Detail extends Component { | |
| convert(temp) { | |
| return Math.round((temp - 273.15) * 9/5 + 32) | |
| } | |
| render() { | |
| return ( | |
| <div className="Detail"> |
This file contains hidden or 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 ReactDOM from 'react-dom'; | |
| import App from './App'; | |
| //lets use this store! | |
| import createStore from './createStore'; | |
| import manageBand from './reducers/manageBand'; | |
| // setting this function call to a variable allows us to | |
| // access the return functions in createStore like such: |
This file contains hidden or 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 { renderer } from './index.js'; | |
| export default function createStore(reducer) { | |
| // We're defining a new variable called state where we | |
| // are going to set to be equal to the state in our reducer | |
| let state; | |
| function dispatch(action) { |
This file contains hidden or 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, { Component } from 'react'; | |
| import BandInput from './components/BandInput'; | |
| import Bands from './components/Bands'; | |
| class App extends Component{ | |
| // We have to continue passing in the function store into children | |
| // components. | |
| render(){ | |
| return( |
This file contains hidden or 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
| // manageBand is our state manager for Bands. Basically, | |
| // instead of making changes in component states, | |
| // we're going to be taking care of those state changes here when it | |
| // comes to Bands. | |
| //counter is just for the unique ID for our Delete case. | |
| let counter = 0 | |
| export default function manageBand (state = { | |
| bands: [] |