How to use action-creators - 10 common examples

To help you get started, we’ve selected a few action-creators 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 noobaa / noobaa-core / frontend / src / app / components / modals / create-namespace-resource-modal / create-namespace-resource-modal.js View on Github external
onSubmit(values) {
        const { resourceName, connection, target } = values;
        this.dispatch(
            closeModal(),
            createNamespaceResource(resourceName, connection, target)
        );
    }
github noobaa / noobaa-core / frontend / src / app / components / modals / create-pool-modal / create-pool-modal.js View on Github external
onSubmit({ poolName, selectedHosts }) {
        this.dispatch(
            createHostsPool(poolName, selectedHosts),
            closeModal()
        );
    }
github noobaa / noobaa-core / frontend / src / app / components / bucket / add-tier-modal / add-tier-modal.js View on Github external
onSubmit(values) {
        this.dispatch(closeModal());
        this.dispatch(addBucketTier(
            this.bucketName, values.policyType,
            values.selectedResources
        ));
    }
github noobaa / noobaa-core / frontend / src / app / components / modals / edit-server-dns-settings-modal / edit-server-dns-settings-modal.js View on Github external
onSubmit(values) {
        const { serverSecret, serverHostname } = this;
        const { primaryDNS, secondaryDNS } = values;

        this.dispatch(
            updateServerDNSSettings(
                serverSecret,
                serverHostname,
                primaryDNS,
                secondaryDNS
            ),
            closeModal()
        );
    }
github noobaa / noobaa-core / frontend / src / app / components / modals / risky-bucket-data-resiliency-warning-modal / risky-bucket-data-resiliency-warning-modal.js View on Github external
onSubmit() {
        const { bucketName, tierName, policy } = this;
        action$.next(updateBucketResiliencyPolicy(bucketName, tierName, policy));
        action$.next(closeModal(2));
    }
github noobaa / noobaa-core / frontend / src / app / components / modals / change-cluster-connectivity-ip-modal / change-cluster-connectivity-ip-modal.js View on Github external
onSubmit(values) {
        action$.next(
            updateServerAddress(
                this.secret,
                values.newAddress,
                this.hostname
            )
        );
        action$.next(closeModal());
    }
github noobaa / noobaa-core / frontend / src / app / components / modals / edit-host-storage-drives-modal / edit-host-storage-drives-modal.js View on Github external
onSubmit({ serviceState, nodesState }) {
        const action = serviceState ?
            toggleHostNodes(this.host, nodesState) :
            openDisableHostStorageWarningModal(this.host, this.isLastService);

        action$.next(closeModal());
        action$.next(action);
    }
github noobaa / noobaa-core / frontend / src / app / components / modals / edit-bucket-spillover-modal / edit-bucket-spillover-modal.js View on Github external
onSubmit(values) {
        const { target, useSpillover } = values;
        const resource = useSpillover ? target : null;
        action$.next(updateBucketSpilloverPolicy(this.bucketName, resource));
        action$.next(closeModal());
    }
github noobaa / noobaa-core / frontend / src / app / components / modals / start-maintenance-modal / start-maintenance-modal.js View on Github external
onSubmit() {
        action$.next(enterMaintenanceMode(this.durationInMin()));
        action$.next(closeModal());
    }
}

action-creators

Redux action creators with logging and validation

MIT
Latest version published 7 years ago

Package Health Score

42 / 100
Full package analysis