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
// As I was considering how to solve the problem, I saw two main paths forward. Either a recursive solution, | |
// or an iterative solution. The recursive solution was more obvious to me, so that's where I stared. Looking | |
// at the pyramid, what I saw was that the "longest slide down" from any point was going to be sum of that | |
// element, plus the "longest slide down" from the max of the left or right options. Visually: | |
// The pyramid: | |
7 | |
4 8 | |
6 9 3 |
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' | |
const FilterLink = ({ active, children, handleClick }) => { | |
if (active) { | |
return <span>{ children }</span> | |
} | |
return ( | |
<a href="#" | |
onClick={ (e) => { |
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 { connect } from 'react-redux' | |
import uuid from 'uuid/v1' | |
class AddTodoForm extends Component { | |
constructor(props) { | |
super(props) | |
this.state = { text: '' } | |
} |
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
{ | |
"parser": "babel-eslint", | |
"extends": [ | |
"eslint:recommended", | |
"plugin:react/recommended" | |
], | |
"plugins": [ | |
"react" | |
], | |
"env": { |