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 TeslaCar from '../components/TeslaCar/TeslaCar'; | |
import { connect } from 'react-redux'; | |
const mapStateToProps = (state) => { | |
return { | |
wheelsize: state.config.wheels | |
} | |
} | |
const TeslaCarContainer = connect(mapStateToProps, null)(TeslaCar) |
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 TeslaStats from '../components/TeslaStats/TeslaStats'; | |
import { connect } from 'react-redux'; | |
const mapStateToProps = (state) => { | |
return { | |
carstats: state.carstats | |
} | |
} | |
const TeslaStatsContainer = connect(mapStateToProps, null)(TeslaStats) |
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 TeslaCounter from '../components/TeslaCounter/TeslaCounter'; | |
import { connect } from 'react-redux'; | |
import { speedUp, speedDown } from '../actions' | |
import { counterDefaultVal } from '../constants/counterDefaultVal'; | |
const mapStateToProps = (state) => { | |
return { | |
currentValue: state.config.speed, | |
initValues: counterDefaultVal.speed | |
} |
OlderNewer