11# MobX RESTful
22
3- Common [ MobX] [ 1 ] ** abstract base Class & Decorator** utilities for [ RESTful API] [ 2 ] .
3+ Common [ MobX] [ 1 ] ** abstract base Class & [ Decorator] [ 2 ] ** utilities for [ RESTful API] [ 3 ] .
44
55Just define your ** Data models** & ** Client HTTP methods** , then leave rest of things to MobX!
66
77[ ![ MobX compatibility] ( https://img.shields.io/badge/Compatible-1?logo=mobx&label=MobX%206%2F7 )] [ 1 ]
8- [ ![ NPM Dependency] ( https://img.shields.io/librariesio/github/idea2app/MobX-RESTful.svg )] [ 3 ]
9- [ ![ CI & CD] ( https://github.com/idea2app/MobX-RESTful/actions/workflows/main.yml/badge.svg )] [ 4 ]
8+ [ ![ NPM Dependency] ( https://img.shields.io/librariesio/github/idea2app/MobX-RESTful.svg )] [ 4 ]
9+ [ ![ CI & CD] ( https://github.com/idea2app/MobX-RESTful/actions/workflows/main.yml/badge.svg )] [ 5 ]
1010
11- [ ![ NPM] ( https://nodei.co/npm/mobx-restful.png?downloads=true&downloadRank=true&stars=true )] [ 5 ]
11+ [ ![ NPM] ( https://nodei.co/npm/mobx-restful.png?downloads=true&downloadRank=true&stars=true )] [ 6 ]
1212
1313## Versions
1414
@@ -19,6 +19,27 @@ Just define your **Data models** & **Client HTTP methods**, then leave rest of t
1919
2020## Usage
2121
22+ ### ` package.json `
23+
24+ ``` json
25+ {
26+ "dependencies" : {
27+ "koajax" : " ^3.0.0" ,
28+ "mobx" : " ^6.13.1" ,
29+ "mobx-restful" : " ^1.0.1"
30+ },
31+ "resolutions" : {
32+ "native-file-system-adapter" : " npm:@tech_query/native-file-system-adapter@^3.0.1"
33+ }
34+ }
35+ ```
36+
37+ > This ` resolutions ` configuration is used for ** Node.js** , such Back-end API or Server-side Rendering.
38+ >
39+ > You should install your project with [ Yarn] [ 7 ] or [ PNPM] [ 8 ] to support this feature.
40+ >
41+ > It can be removed after [ ` require('esm') ` shipped formally] [ 9 ] .
42+
2243### ` tsconfig.json `
2344
2445``` json
@@ -83,7 +104,7 @@ export default new RepositoryModel();
83104
84105#### ` page/Repository.tsx `
85106
86- Use [ WebCell] [ 6 ] as an Example
107+ Use [ WebCell] [ 10 ] as an Example
87108
88109``` tsx
89110import { component , observer } from ' web-cell' ;
@@ -230,12 +251,16 @@ Here is an example:
230251
231252## Limitation
232253
233- - [ ] [ ` abstract ` hint of Mixin is missing] [ 7 ]
254+ - [ ] [ ` abstract ` hint of Mixin is missing] [ 11 ]
234255
235256[ 1 ] : https://mobx.js.org/
236- [ 2 ] : https://en.wikipedia.org/wiki/Representational_state_transfer
237- [ 3 ] : https://libraries.io/npm/mobx-restful
238- [ 4 ] : https://github.com/idea2app/MobX-RESTful/actions/workflows/main.yml
239- [ 5 ] : https://nodei.co/npm/mobx-restful/
240- [ 6 ] : https://github.com/EasyWebApp/WebCell
241- [ 7 ] : https://github.com/microsoft/TypeScript/issues/39752#issuecomment-1239810720
257+ [ 2 ] : https://github.com/tc39/proposal-decorators
258+ [ 3 ] : https://en.wikipedia.org/wiki/Representational_state_transfer
259+ [ 4 ] : https://libraries.io/npm/mobx-restful
260+ [ 5 ] : https://github.com/idea2app/MobX-RESTful/actions/workflows/main.yml
261+ [ 6 ] : https://nodei.co/npm/mobx-restful/
262+ [ 7 ] : https://yarnpkg.com/
263+ [ 8 ] : https://pnpm.io/
264+ [ 9 ] : https://joyeecheung.github.io/blog/2024/03/18/require-esm-in-node-js/
265+ [ 10 ] : https://github.com/EasyWebApp/WebCell
266+ [ 11 ] : https://github.com/microsoft/TypeScript/issues/39752#issuecomment-1239810720
0 commit comments