How to use the recompact.withHandlers function in recompact

To help you get started, we’ve selected a few recompact 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 rainbow-me / rainbow / src / hoc / withAccountRefresh.js View on Github external
export default Component => compose(
  connect(null, { assetsRefreshState, transactionsRefreshState }),
  withHandlers({
    refreshAccount: (ownProps) => async () => {
      try {
        await ownProps.assetsRefreshState();
        await ownProps.transactionsRefreshState();
      } catch (error) {
        // TODO more granular error messaging depending on offline status
      }
    },
  }),
)(Component);

recompact

A set of React high order components based on Rx.

MIT
Latest version published 6 years ago

Package Health Score

45 / 100
Full package analysis