How to use the spunky.withData function in spunky

To help you get started, we’ve selected a few spunky 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 CityOfZion / neon-wallet / app / hocs / withProgressChange.js View on Github external
const passDownProps = omit(this.props, DATA_PROP, PROGRESS_PROP)
        return 
      }

      getCallbackState = props => ({
        data: props[DATA_PROP],
        error: props[ERROR_PROP],
      })

      getCallbackProps = props =>
        omit(props, DATA_PROP, ERROR_PROP, PROGRESS_PROP)
    }

    return compose(
      withProgress(actions, { propName: PROGRESS_PROP }),
      withData(actions, mapDataToProps),
      withError(actions, mapErrorToProps),
    )(WrappedComponent)
  }
}
github nos / client / src / renderer / shared / hocs / withProgressChange.js View on Github external
const passDownProps = omit(this.props, DATA_PROP, PROGRESS_PROP);
        return ;
      }

      getCallbackState = (props) => {
        return { data: props[DATA_PROP], error: props[ERROR_PROP] };
      }

      getCallbackProps = (props) => {
        return omit(props, DATA_PROP, ERROR_PROP, PROGRESS_PROP);
      }
    }

    return compose(
      withProgress(actions, { propName: PROGRESS_PROP }),
      withData(actions, mapDataToProps),
      withError(actions, mapErrorToProps)
    )(WrappedComponent);
  };
}
github CityOfZion / neon-wallet / app / hocs / withBalancesData.js View on Github external
export default function withBalancesData(mapBalancesDataToProps: Function) {
  return withData(balancesActions, mapBalancesDataToProps)
}
github nos / client / src / renderer / register / components / Register / index.js View on Github external
import { compose } from 'recompose';
import { withData } from 'spunky';

import withUnmountReset from 'shared/hocs/withUnmountReset';

import Register from './Register';
import createAccountActions from '../../actions/createAccountActions';

const mapAccountDataToProps = (account) => ({ account });

export default compose(
  withUnmountReset(createAccountActions),
  withData(createAccountActions, mapAccountDataToProps)
)(Register);
github nos / client / src / renderer / browser / hocs / withInvocationPrompt / index.js View on Github external
export default function withInvocationPrompt(balancesActions) {
  return compose(
    withNetworkData(),
    withData(authActions, mapAuthDataToProps),
    withCall(balancesActions),
    withNullLoader(balancesActions),
    withData(balancesActions, mapBalancesDataToProps),
    withPrompt(InvocationPrompt, (props) => ({
      title: null,
      renderFooter: () => 
    }))
  );
}
github nos / client / src / renderer / browser / components / RequestsProcessor / GetPublicKey / index.js View on Github external
export default function makeGetPublicKey(publicKeyActions) {
  return compose(
    withClean(publicKeyActions),

    withData(authActions, mapAuthDataToProps),

    withInitialCall(publicKeyActions, ({ wif }) => ({ wif })),
    withNullLoader(publicKeyActions),
    withData(publicKeyActions, mapPublicKeyDataToProps)
  )(GetPublicKey);
}
github nos / client / src / renderer / account / components / Management / Wallets / index.js View on Github external
import { compose } from 'recompose';
import { withData } from 'spunky';

import authActions from 'auth/actions/authActions';

import Wallets from './Wallets';

const mapAuthDataToProps = (account) => ({ account });

export default compose(withData(authActions, mapAuthDataToProps))(Wallets);
github CityOfZion / neon-wallet / app / hocs / withTokensData.js View on Github external
export default function withTokensData(key: string = 'tokens') {
  return compose(
    withData(settingsActions, settings => ({ [key]: settings.tokens })),
    withRecall(icoTokensActions, ['tokens']),
  )
}

spunky

Lifecycle management for react-redux

MIT
Latest version published 6 years ago

Package Health Score

36 / 100
Full package analysis