Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wora/redux #12

Closed
7 tasks done
morrys opened this issue Sep 6, 2019 · 0 comments
Closed
7 tasks done

wora/redux #12

morrys opened this issue Sep 6, 2019 · 0 comments
Labels
enhancement New feature or request

Comments

@morrys
Copy link
Owner

morrys commented Sep 6, 2019

devhub is the project in which I am performing feasibility tests

branch: perf-cache

  • migrate redux to wora/redux and adapt it to use wora/cache-persist
  • manage the use of wora / redux with and without persistence
  • manage backward compatibility with redux-persist
  • possibility to manage either the saving of the state in a single key, or to save the keys of the object individually
  • delete error messages from the source code and manage them by code
  • released the first version wora/redux 0.0.1
  • refactor for bundle size & typing

Examples Persist

import { createStore, applyMiddleware, combineReducers } from '@wora/redux'
import ReduxProvider from '@wora/redux/libs/react/ReduxProvider'
const sagaMiddleware = createSagaMiddleware()
const store = createStore(
    rootReducer,
    composeWithDevTools(
      applyMiddleware(bugsnagMiddleware, analyticsMiddleware, sagaMiddleware),
    ),
    undefined,
    {
      key: 'root',
      version: 2,
      //multiple: boolean, to save individual status keys 
      //layers?: Array<Layer>
      //blacklist?: Array<string>, backward compatibility
      //whitelist?: Array<string>, backward compatibility
      //throttle?: number, backward compatibility
      //migrate?: (PersistedState, number) => Promise<PersistedState>, backward compatibility
      //stateReconciler?: false | StateReconciler<S>, backward compatibility
    }
  )
sagaMiddleware.run(rootSaga)
<ReduxProvider store={store} loading={null}>

Examples without Persist

import { createStore, applyMiddleware, combineReducers } from '@wora/redux'
import ReduxProvider from '@wora/redux/libs/react/ReduxProvider'
const sagaMiddleware = createSagaMiddleware()
const store = createStore(
    rootReducer,
    composeWithDevTools(
      applyMiddleware(bugsnagMiddleware, analyticsMiddleware, sagaMiddleware),
    ),
  )
sagaMiddleware.run(rootSaga)
<ReduxProvider store={store} loading={null}>
@morrys morrys added the enhancement New feature or request label Sep 6, 2019
@morrys morrys pinned this issue Sep 6, 2019
@morrys morrys mentioned this issue Oct 6, 2019
7 tasks
@morrys morrys closed this as completed Oct 6, 2019
@morrys morrys unpinned this issue Oct 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant