use-mobx-prop
TypeScript icon, indicating that this package has built-in type declarations

1.2.3 • Public • Published

说明

让你可以在不使用 mobx-react 的情况下以更符合 hooks 的形式使用 mobx

示例

const a = observable({
  a: 1,
});
function Test() {
  const a = useMobxProp(a, "a");
  return <div>{a}</div>;
}

无需使用 useObserver 或 Observer 组件

Readme

Keywords

none

Package Sidebar

Install

npm i use-mobx-prop

Weekly Downloads

0

Version

1.2.3

License

MIT

Unpacked Size

12.9 kB

Total Files

6

Last publish

Collaborators

  • gmono