@curi/mobx
TypeScript icon, indicating that this package has built-in type declarations

1.0.0-alpha.2 • Public • Published

@curi/mobx

npm

EXPERIMENTAL!

@curi/mobx provides MobX integration for your application.

Installation

npm install --save @curi/mobx

For more information, please check out the @curi/mobx page on the documentation website.

Usage

import CuriStore from "@curi/mobx";

const router = curi(history, routes);

const curiStore = new CuriStore(router);

const ResponsiveBase = inject(({ curi }) => ({
  router: curi.router,
  response: curi.response,
  action: curi.action
}))(observer(CuriBase));

router.respond(
  () => {
    ReactDOM.render(
      <Provider curi={curiStore}>
        <ResponsiveBase render={render} />
      </Provider>,
      holder
    );
  },
  { once: true }
);

Readme

Keywords

Package Sidebar

Install

npm i @curi/mobx

Weekly Downloads

7

Version

1.0.0-alpha.2

License

MIT

Last publish

Collaborators

  • pshrmn