reselect#createStructuredSelector JavaScript Examples
The following examples show how to use
reselect#createStructuredSelector.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: LandedProperty.jsx From mapstore2-cadastrapp with GNU General Public License v3.0 | 6 votes |
LandedProperty = connect(createStructuredSelector({
parcelle: landedPropertyParcelleSelector,
show: landedPropertyParcelleSelector,
layers: mapLayersSelector,
map: mapSelector,
configuration: configurationSelector
}), {
onClose: () => showLandedPropertyInformation(undefined)
})((props) => {
if (!props.show) {
return null;
}
return <LandedPropertyInformationModal {...props} />;
})
Example #2
Source File: index.js From bank-client with MIT License | 6 votes |
stateSelector = createStructuredSelector({ currentStep: makeSelectCurrentStep(), isLoading: makeSelectIsLoading([ getRequestName(CREATE_TRANSACTION_REQUEST), getRequestName(GET_BILLS_REQUEST), getRequestName(CONFIRM_TRANSACTION_REQUEST), ]), error: makeSelectError([ getRequestName(GET_BILLS_REQUEST), getRequestName(CHECK_RECIPIENT_INCORRECT), getRequestName(CONFIRM_TRANSACTION_INCORRECT), ]), transferTitle: makeSelectTransferTitle(), amountMoney: makeSelectAmountMoney(), bills: makeSelectBills(), authorizationKey: makeSelectAuthorizationKey(), hasCreatedTransaction: makeSelectHasCreatedTransaction(), })
Example #3
Source File: index.js From rysolv with GNU Affero General Public License v3.0 | 6 votes |
export default function withAuth(config, Component) {
const Auth = ({ authenticateLoading, isSignedIn, ...restProps }) => {
const { isPrivate } = config;
const { pathname } = window.location;
const basePathname = pathname.split('/')[1];
const isSignInPath = basePathname === 'signin' || basePathname === 'signup';
while (authenticateLoading) {
return <LoadingIndicator />;
}
if (isPrivate && isSignedIn && isSignInPath) {
return <Redirect to="/signin" />;
}
if (isPrivate && !isSignedIn) {
return <Redirect to="/signin" />;
}
return <Component {...restProps} />;
};
Auth.propTypes = {
authenticateLoading: T.bool.isRequired,
isSignedIn: T.bool.isRequired,
};
const mapStateToProps = createStructuredSelector({
/**
* Reducer: Auth
*/
authenticateLoading: makeSelectAuthLoading('authenticateUser'),
isSignedIn: makeSelectAuth('isSignedIn'),
});
const withConnect = connect(
mapStateToProps,
null,
);
return compose(withConnect)(Auth);
}
Example #4
Source File: CartIcon.js From Merch-Dropper-fe with MIT License | 5 votes |
mapStateToProps = createStructuredSelector({
//itemCount: selectCartItemsCount
})
Example #5
Source File: index.js From QiskitFlow with Apache License 2.0 | 5 votes |
mapStateToProps = createStructuredSelector({ user: makeSelectUser(), loggedIn: makeSelectLoggedIn(), })
Example #6
Source File: FollowButton.js From instaclone with Apache License 2.0 | 5 votes |
mapStateToProps = createStructuredSelector({ currentUser: selectCurrentUser, token: selectToken, })
Example #7
Source File: all-cases.component.jsx From covid-19-monitor with MIT License | 5 votes |
mapStateToProps = createStructuredSelector({ all: selectAll })
Example #8
Source File: graph.js From ThreatMapper with Apache License 2.0 | 5 votes |
layoutOptionsSelector = createStructuredSelector({
forceRelayout: state => state.get('forceRelayout'),
height: canvasHeightSelector,
topologyId: state => state.get('currentTopologyId'),
topologyOptions: activeTopologyOptionsSelector,
width: canvasWidthSelector,
})
Example #9
Source File: index.js From awsboilerplate with MIT License | 5 votes |
mapStateToProps = createStructuredSelector({ hello_to: makeSelectHello(), })
Example #10
Source File: index.js From hackchat-client with Do What The F*ck You Want To Public License | 5 votes |
mapStateToProps = createStructuredSelector({
// channelData: makeSelectChannelData(),
})
Example #11
Source File: App.js From Pandemic-Produce-Delivery-Project with MIT License | 5 votes |
mapStateToProps = createStructuredSelector({ user: selectCurrentUser, })