How to use the react-components.useEventManager function in react-components

To help you get started, we’ve selected a few react-components 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 ProtonMail / react-components / containers / account / DeleteAccountModal.js View on Github external
const DeleteAccountModal = ({ onClose, ...rest }) => {
    const { createNotification } = useNotifications();
    const eventManager = useEventManager();
    const api = useApi();
    const authentication = useAuthentication();
    const [{ isAdmin, Name } = {}] = useUser();
    const [{ TwoFactor } = {}] = useUserSettings();
    const [loading, setLoading] = useState(false);
    const [model, setModel] = useState({
        feedback: '',
        email: '',
        password: '',
        twoFa: ''
    });
    const { CLIENT_ID, APP_VERSION, CLIENT_TYPE } = useConfig();
    const Client = getClient(CLIENT_ID);

    const handleChange = (key) => ({ target }) => setModel({ ...model, [key]: target.value });

react-components

React components used by Khan Academy

MIT
Latest version published 7 years ago

Package Health Score

48 / 100
Full package analysis