Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import React, { createClass, PropTypes } from 'react';
import { Route } from 'react-router';
import { connect } from 'react-redux';
import { render, register } from 'hops';
import { headline } from './style.css';
const type = 'updateGreeting';
const select = register('home', (state = {}, action) => (
(action.type !== type) ? state : { ...state, greeting: action.payload }
));
const update = (payload) => ({ type, payload });
const Home = connect(select, { update })(
createClass({
displayName: 'Home',
propTypes: {
greeting: PropTypes.string,
update: PropTypes.func
},
componentDidMount() {
this.props.update('Hello World!');
},
render() {
return (