redux-nara
TypeScript icon, indicating that this package has built-in type declarations

0.1.0 • Public • Published

Redux Nara

Features

  • Asynchronous
  • Routing
  • Key Command

Asynchronous

const getUserData: NaraAsyncWorker<MyAction, MyAppState> = async function(action: MyAction, dispatcher: Dispatch<S>) {
    const user = await api.getUser();

    dispatcher(createSuccessGetUser(user));

    const action2 = await waitAction<MyAction2>(MY_ACTION2)

    const state = getState();

};

const listener: NaraAsyncListener<MyAppState> = {
    actionType: GET_USER_DATA,
    worker: getUserData,
    options: {
        allowParallel: false,
    },
};

Key Command

const keyCommand = new NaraKeyCommand({
    onlyWithModifierKey: false,
    combinations: [
        { modifier: "Ctrl", key: "A" },
    ],
});

/redux-nara/

    Package Sidebar

    Install

    npm i redux-nara

    Weekly Downloads

    0

    Version

    0.1.0

    License

    MIT

    Unpacked Size

    19.5 kB

    Total Files

    20

    Last publish

    Collaborators

    • inabe49