@australis/react-breakpoints
TypeScript icon, indicating that this package has built-in type declarations

1.0.1-3 • Public • Published

install:

npm i @australis/react-breakpoints
npm i react redux react-redux

usage:

    import * as React from "react";
    import { createStore, combineReducers } from "redux";
    import { Provider } from "react-redux";
    import { WithBreakpoints, store as rbp } from "@australis/react-breakpoint";
    /** */
    const store = createStore(
    combineReducers({
        [rbp.STORE_KEY]: rbp
        .createReducer(
            /* initial state */
            /* breakpoints: [{ key: "xs", value: 0}], window: Window */
        ),
    }),
    );
    /** */
    /** */
    class App extends React.Component {
    render() {
        return (
        <Provider store={store}>
            <WithBreakpoints
            children={state => {
                return (
                <div style={{ margin: "1rem" }}>
                    <pre>State : {JSON.stringify(state, null, 2)}</pre>
                </div>
                );
            }}
            />
        </Provider>
        );
    }
    }

Readme

Keywords

Package Sidebar

Install

npm i @australis/react-breakpoints

Weekly Downloads

0

Version

1.0.1-3

License

ISC

Unpacked Size

31.5 kB

Total Files

30

Last publish

Collaborators

  • d10221