npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@wora/redux

v2.0.0-rc.4

Published

@wora Redux

Downloads

2

Readme

@wora/redux

Installation

Install @wora/redux using yarn or npm:

yarn add @wora/redux

Examples Persist

import { createStore, applyMiddleware, combineReducers } from '@wora/redux'

const sagaMiddleware = createSagaMiddleware()

const store = createStore(
    rootReducer,
    composeWithDevTools(
      applyMiddleware(bugsnagMiddleware, analyticsMiddleware, sagaMiddleware),
    ),
    undefined,
    {
      key: 'root',
      version: 2,
      //mutateKeys?: Array<IMutateKey>
      //mutateValues?: Array<IMutateValue>
      //blacklist?: Array<string>, backward compatibility
      //whitelist?: Array<string>, backward compatibility
      //throttle?: number
      //migrate?: (PersistedState, number) => Promise<PersistedState>, backward compatibility
      //stateReconciler?: false | StateReconciler<S>, backward compatibility
    }
  )


sagaMiddleware.run(rootSaga)

Examples without Persist

import { createStore, applyMiddleware, combineReducers } from '@wora/redux'

const sagaMiddleware = createSagaMiddleware()

const store = createStore(
    rootReducer,
    composeWithDevTools(
      applyMiddleware(bugsnagMiddleware, analyticsMiddleware, sagaMiddleware),
    ),
  )


sagaMiddleware.run(rootSaga)


Options

CacheOptions

TODO

  • typing, for now use redux types
  • refactor

Errors

  • CREATE1: It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function.

  • CREATE2: Expected the enhancer to be a function.

  • CREATE3: Expected the reducer to be a function.

  • GETSTATE1: You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.

  • DISPATCH1: Actions must be plain objects. Use custom middleware for async actions.

  • DISPATCH2: Actions may not have an undefined "type" property. Have you misspelled a constant?

  • DISPATCH3: Reducers may not dispatch actions.

  • REPLACE1: Expected the nextReducer to be a function.

  • OBSERVER1: Expected the observer to be an object.

  • APPLY1: Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.

  • REDUCER1, actionDescription, key: Given ${actionDescription}, reducer "${key}" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.

  • REDUCER2: Store does not have a valid reducer. Make sure the argument passed to combineReducers is an object whose values are reducers.

  • REDUCER3, key: Reducer "${key}" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.

  • REDUCER4, key, ActionTypes.INIT: Reducer "${key}" returned undefined when probed with a random type. Don't try to handle ${ActionTypes.INIT} or other actions in "redux/*" namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.