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
export default class SomethingView extends BaseTemplate { | |
// You can always overide the other class functions | |
renderFooter() { | |
return ( | |
<div> | |
...coool footer | |
</div> | |
); | |
} |
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
export default class SetValueExample extends React.Component { | |
constructor() { | |
super(); | |
this.state = { | |
myName: '', | |
}; | |
} | |
setValue(e) { | |
this.setState({[e.target.name]: e.target.value}); |
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
componentDidMount(){ | |
document.title = "Store Profile" | |
} |
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 * as d3 from "d3"; | |
import Tooltip from "./Tooltip" | |
import Icon from "./Icon" | |
import Spinner from "./Spinner2" | |
import Network from "./galaxy/Network" | |
var simulation; | |
export default class Galaxy extends React.Component { |
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
class Container extends React.Component { | |
render(){ | |
const { props } = this; | |
return( | |
<div className="main-content"> | |
{ | |
React.Children.map(this.props.children, function(child) { | |
return React.cloneElement( | |
child, | |
{ ...props } |
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"; | |
export default class Login extends React.Component { | |
state = { | |
email: "", | |
password: "" | |
} | |
//THIS IS A DIFFERENT WAY TO BIND THIS TO THE FUNCTION |
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
export function createReducer(initialState, reducerMap) { | |
return (state = initialState, action) => { | |
const reducer = reducerMap[action.type]; | |
return reducer | |
? reducer(state, action.payload) | |
: state; | |
}; | |
} |
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 * as d3 from "d3"; | |
var simulation; | |
var svg; | |
export default class Network extends React.Component { | |
shouldComponentUpdate(nextProps, nextState) { | |
return false; | |
} |
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 * as d3 from "d3"; | |
import Tooltip from "./Tooltip" | |
import Icon from "./Icon" | |
import Spinner from "./Spinner2" | |
import Network from "./galaxy/Network" | |
var simulation; | |
var svg; | |
export default class Galaxy extends React.Component { |
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 {connect} from "react-redux"; | |
import {bindActionCreators} from "redux"; | |
import { push, replace } from "react-router-redux"; | |
class AuthContainer extends React.Component { | |
componentWillReceiveProps(nextProps) { | |
this.isAuthenticated(); | |
} |