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
function greet(greeting, name = "Matthew") { | |
console.log(greeting + ", " + name); | |
} | |
greet("Hello"); |
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
function receive (complete = function () { | |
console.log("complete"); | |
}) { | |
complete(); | |
} | |
receive(); |
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 { getModelData } from '../services/BatteryService'; | |
const initialState = { | |
carstats:[ | |
{miles:246, model:"60"}, | |
{miles:250, model:"60D"}, | |
{miles:297, model:"75"}, | |
{miles:306, model:"75D"}, | |
{miles:336, model:"90D"}, |
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 { getModelData } from '../services/BatteryService'; | |
const initialState = { | |
carstats: [ | |
{ miles: 246, model: "60" }, | |
{ miles: 250, model: "60D" }, | |
{ miles: 297, model: "75" }, | |
{ miles: 306, model: "75D" }, | |
{ miles: 336, model: "90D" }, | |
{ miles: 376, model: "P100D" } |
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 appReducer from './teslaRangeApp'; | |
const initialState = { | |
carstats:[ | |
{miles:246, model:"60"}, | |
{miles:250, model:"60D"}, | |
{miles:297, model:"75"}, | |
{miles:306, model:"75D"}, | |
{miles:336, model:"90D"}, | |
{miles:376, model:"P100D"} |
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 { getModelData } from '../services/BatteryService'; | |
const initialState = { | |
carstats: [ | |
{ miles: 246, model: "60" }, | |
{ miles: 250, model: "60D" }, | |
{ miles: 297, model: "75" }, | |
{ miles: 306, model: "75D" }, | |
{ miles: 336, model: "90D" }, | |
{ miles: 376, model: "P100D" } |
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 appReducer from './teslaRangeApp'; | |
const initialState = { | |
carstats:[ | |
{miles:246, model:"60"}, | |
{miles:250, model:"60D"}, | |
{miles:297, model:"75"}, | |
{miles:306, model:"75D"}, | |
{miles:336, model:"90D"}, | |
{miles:376, model:"P100D"} |
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, { Component } from 'react'; | |
import { createStore } from 'redux'; | |
import { Provider } from 'react-redux'; | |
import TeslaCarContainer from './containers/TeslaCarContainer'; | |
import TeslaStatsContainer from './containers/TeslaStatsContainer'; | |
import TeslaSpeedCounterContainer from './containers/TeslaSpeedCounterContainer'; | |
import TeslaTempCounterContainer from './containers/TeslaTempCounterContainer'; | |
import TeslaClimateContainer from './containers/TeslaClimateContainer'; | |
import TeslaWheelsContainer from './containers/TeslaWheelsContainer'; | |
import TeslaNotice from './components/TeslaNotice/TeslaNotice'; |
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 './TeslaCounter.css'; | |
const TeslaCounter = ({ initValues, currentValue, increment, decrement }) => ( | |
<div className="tesla-counter"> | |
<p className="tesla-counter__title">{initValues.title}</p> | |
<div className="tesla-counter__container cf"> | |
<div className="tesla-counter__item"> | |
<p className="tesla-counter__number"> | |
{ currentValue } |
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 TeslaCar from '../components/TeslaCar/TeslaCar'; | |
import { connect } from 'react-redux'; | |
const mapStateToProps = (state) => { | |
return { | |
wheelsize: state.config.wheels | |
} | |
} | |
const TeslaCarContainer = connect(mapStateToProps, null)(TeslaCar) |
OlderNewer