How to use the redux-bundler.composeBundlesRaw function in redux-bundler

To help you get started, we’ve selected a few redux-bundler 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 HenrikJoreteg / redux-bundler-react / test / react-bindings.js View on Github external
const { createElement } = require('react')
const test = require('tape')
const { composeBundlesRaw, createSelector } = require('redux-bundler')
const render = require('react-dom/server').renderToStaticMarkup
const { connect, Provider } = require('../')

const getStore = composeBundlesRaw({
  name: 'numberBundle',
  reducer: (state = 0, { type, payload }) => {
    if (type === 'INCREMENT') {
      return state + 1
    }
    if (type === 'DECREMENT') {
      return state - 1
    }
    return state
  },
  selectNumber: state => state.numberBundle,
  selectIsPositive: createSelector('selectNumber', number => number > 0)
})

const Page = ({ number }) => createElement('div', null, number)
github blockstack / blockstack.org / bundles / index.js View on Github external
import { composeBundlesRaw, debugBundle } from 'redux-bundler'

import blog from './blog'
import jobs from './jobs'
import ui from './ui'

export default composeBundlesRaw(blog, jobs, ui, debugBundle)