How to use the hops.register function in hops

To help you get started, we’ve selected a few hops examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github xing / hops / app / src / main.js View on Github external
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 (

hops

Hops main Package to build and run Hops applications

MIT
Latest version published 2 years ago

Package Health Score

51 / 100
Full package analysis