Skip to content

Commit

Permalink
docs(website): update
Browse files Browse the repository at this point in the history
  • Loading branch information
unadlib committed Feb 6, 2023
1 parent 30b550e commit e96a11e
Show file tree
Hide file tree
Showing 48 changed files with 208 additions and 208 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Reactant is a progressive framework. In the process of developing applications f

### Better Immutable State Management

React advocates immutable state type management, and Redux clearly fits this. But the fact is that simple mutation update operations like MobX are increasingly in line with current trends. Therefore Reactant provides a new immutable state management model based on Redux and Immer, which incorporates similar API elements of MobX. And more importantly, it still maintains the immutability of state.
React advocates immutable state type management, and Redux clearly fits this. But the fact is that simple mutation update operations like MobX are increasingly in line with current trends. Therefore Reactant provides a new immutable state management model based on Redux and [Mutative](https://github.com/unadlib/mutative), which incorporates similar API elements of MobX. And more importantly, it still maintains the immutability of state.

```ts
@injectable()
Expand Down Expand Up @@ -93,7 +93,7 @@ Reactant will do more features that improve the development experience.

### Benchmark Performance

In benchmark performance tests between Reactant and MobX+React, Reactant has the edge in startup time and derived computing, while MobX+React has the edge in value updates. And overall, the performance difference is not particularly significant. Because Reactant is based on Immer, Reactant also provides a performance-optimized solution when encountering a very few extreme performance bottlenecks.
In benchmark performance tests between Reactant and MobX+React, Reactant has the edge in startup time and derived computing, while MobX+React has the edge in value updates. And overall, the performance difference is not particularly significant. Because Reactant is based on [Mutative](https://github.com/unadlib/mutative), Reactant also provides a performance-optimized solution when encountering a very few extreme performance bottlenecks.

Reactant is committed to maintaining good performance while continuing to build a productive React framework.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ With that, we can quickly turn SharedWorker mode into SharedTab mode.

### Transport/Performance

Since the client app only renders and receives synchronized state. So the client app keeps running smoothly when the size of each dispatch update state does not exceed 50M. reactant uses [Immer patch](https://immerjs.github.io/immer/patches/) to update, usually this patch will be very small and reactant also does DEV checking for patch minimization updates. In fact, in most scenarios, the patch will not be that large.
Since the client app only renders and receives synchronized state. So the client app keeps running smoothly when the size of each dispatch update state does not exceed 50M. reactant uses [Mutative Patch](https://github.com/unadlib/mutative) to update, usually this patch will be very small and reactant also does DEV checking for patch minimization updates. In fact, in most scenarios, the patch will not be that large.

| Update state size | Volume of data | Deserialization |
| ------------------------- | -------------- | --------------- |
Expand Down Expand Up @@ -388,7 +388,7 @@ But in terms of module model and shared model, reactant-share already provides a

reactant-share is a framework for building Shared Web Apps. But such a model is not free, and it will face performance issues with data transfer (The high maintenance cost of the SharedArrayBuffer has forced us to abandon it for now as well. In fact this is a problem caused by the fact that JS "multithreading" does not share memory efficiently).

Although Shared Web Apps lets the client App run in a render-only client thread, it introduces the additional overhead of synchronous state transfer. We must ensure that it is lightweight and efficient enough. While reactant-share does state patch based on Immer, it is always difficult to ensure that each patch is minimally updated.
Although Shared Web Apps lets the client App run in a render-only client thread, it introduces the additional overhead of synchronous state transfer. We must ensure that it is lightweight and efficient enough. While reactant-share does state patch based on [Mutative](https://github.com/unadlib/mutative), it is always difficult to ensure that each patch is minimally updated.

reactant-share provides a development option `enablePatchesChecker`. In development mode, it is enabled by default. Any mutation operation that is not a valid mutation will be alerted, usually eliminating the alert, and reactant-share will try to keep the update size as minimal as possible.

Expand Down
6 changes: 3 additions & 3 deletions website/docs/api/reactant-di/classes/optional.Optional.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ custom_edit_url: null

#### Defined in

[packages/reactant-di/src/optional.ts:9](https://github.com/unadlib/reactant/blob/4ec91913/packages/reactant-di/src/optional.ts#L9)
[packages/reactant-di/src/optional.ts:9](https://github.com/unadlib/reactant/blob/30b550e1/packages/reactant-di/src/optional.ts#L9)

## Properties

Expand All @@ -33,7 +33,7 @@ custom_edit_url: null

#### Defined in

[packages/reactant-di/src/optional.ts:9](https://github.com/unadlib/reactant/blob/4ec91913/packages/reactant-di/src/optional.ts#L9)
[packages/reactant-di/src/optional.ts:9](https://github.com/unadlib/reactant/blob/30b550e1/packages/reactant-di/src/optional.ts#L9)

## Accessors

Expand All @@ -47,4 +47,4 @@ custom_edit_url: null

#### Defined in

[packages/reactant-di/src/optional.ts:11](https://github.com/unadlib/reactant/blob/4ec91913/packages/reactant-di/src/optional.ts#L11)
[packages/reactant-di/src/optional.ts:11](https://github.com/unadlib/reactant/blob/30b550e1/packages/reactant-di/src/optional.ts#L11)
2 changes: 1 addition & 1 deletion website/docs/api/reactant-di/modules/decorators_inject.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,4 @@ expect(fooBar.instance.foo.getValue()).toBe('foo');

#### Defined in

[packages/reactant-di/src/decorators/inject.ts:51](https://github.com/unadlib/reactant/blob/4ec91913/packages/reactant-di/src/decorators/inject.ts#L51)
[packages/reactant-di/src/decorators/inject.ts:51](https://github.com/unadlib/reactant/blob/30b550e1/packages/reactant-di/src/decorators/inject.ts#L51)
Original file line number Diff line number Diff line change
Expand Up @@ -109,4 +109,4 @@ expect(fooBar.instance.foo.getValue()).toBe('foo');

#### Defined in

[packages/reactant-di/src/decorators/injectable.ts:84](https://github.com/unadlib/reactant/blob/4ec91913/packages/reactant-di/src/decorators/injectable.ts#L84)
[packages/reactant-di/src/decorators/injectable.ts:84](https://github.com/unadlib/reactant/blob/30b550e1/packages/reactant-di/src/decorators/injectable.ts#L84)
2 changes: 1 addition & 1 deletion website/docs/api/reactant-di/modules/decorators_lazy.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,4 +86,4 @@ expect(bar.foo?.test).toBe('test');

#### Defined in

[packages/reactant-di/src/decorators/lazy.ts:41](https://github.com/unadlib/reactant/blob/4ec91913/packages/reactant-di/src/decorators/lazy.ts#L41)
[packages/reactant-di/src/decorators/lazy.ts:41](https://github.com/unadlib/reactant/blob/30b550e1/packages/reactant-di/src/decorators/lazy.ts#L41)
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ custom_edit_url: null

#### Defined in

[packages/reactant-di/src/decorators/multiInject.ts:6](https://github.com/unadlib/reactant/blob/4ec91913/packages/reactant-di/src/decorators/multiInject.ts#L6)
[packages/reactant-di/src/decorators/multiInject.ts:6](https://github.com/unadlib/reactant/blob/30b550e1/packages/reactant-di/src/decorators/multiInject.ts#L6)
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ custom_edit_url: null

#### Defined in

[packages/reactant-di/src/decorators/multiOptional.ts:7](https://github.com/unadlib/reactant/blob/4ec91913/packages/reactant-di/src/decorators/multiOptional.ts#L7)
[packages/reactant-di/src/decorators/multiOptional.ts:7](https://github.com/unadlib/reactant/blob/30b550e1/packages/reactant-di/src/decorators/multiOptional.ts#L7)
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,4 @@ expect(fooBar.fooBar.bar).toBeUndefined();

#### Defined in

[packages/reactant-di/src/decorators/optional.ts:47](https://github.com/unadlib/reactant/blob/4ec91913/packages/reactant-di/src/decorators/optional.ts#L47)
[packages/reactant-di/src/decorators/optional.ts:47](https://github.com/unadlib/reactant/blob/30b550e1/packages/reactant-di/src/decorators/optional.ts#L47)
2 changes: 1 addition & 1 deletion website/docs/api/reactant-di/modules/forwardRef.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ custom_edit_url: null

#### Defined in

[packages/reactant-di/src/forwardRef.ts:4](https://github.com/unadlib/reactant/blob/4ec91913/packages/reactant-di/src/forwardRef.ts#L4)
[packages/reactant-di/src/forwardRef.ts:4](https://github.com/unadlib/reactant/blob/30b550e1/packages/reactant-di/src/forwardRef.ts#L4)
2 changes: 1 addition & 1 deletion website/docs/api/reactant-di/modules/optional.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ custom_edit_url: null

#### Defined in

[packages/reactant-di/src/optional.ts:3](https://github.com/unadlib/reactant/blob/4ec91913/packages/reactant-di/src/optional.ts#L3)
[packages/reactant-di/src/optional.ts:3](https://github.com/unadlib/reactant/blob/30b550e1/packages/reactant-di/src/optional.ts#L3)
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Service.\_\_@storeKey@102401

#### Defined in

[packages/reactant-module/src/core/plugin.ts:15](https://github.com/unadlib/reactant/blob/4ec91913/packages/reactant-module/src/core/plugin.ts#L15)
[packages/reactant-module/src/core/plugin.ts:15](https://github.com/unadlib/reactant/blob/30b550e1/packages/reactant-module/src/core/plugin.ts#L15)

___

Expand All @@ -41,7 +41,7 @@ inject enhancer for Redux

#### Defined in

[packages/reactant-module/src/core/plugin.ts:32](https://github.com/unadlib/reactant/blob/4ec91913/packages/reactant-module/src/core/plugin.ts#L32)
[packages/reactant-module/src/core/plugin.ts:32](https://github.com/unadlib/reactant/blob/30b550e1/packages/reactant-module/src/core/plugin.ts#L32)

___

Expand All @@ -53,7 +53,7 @@ inject middleware for Redux

#### Defined in

[packages/reactant-module/src/core/plugin.ts:27](https://github.com/unadlib/reactant/blob/4ec91913/packages/reactant-module/src/core/plugin.ts#L27)
[packages/reactant-module/src/core/plugin.ts:27](https://github.com/unadlib/reactant/blob/30b550e1/packages/reactant-module/src/core/plugin.ts#L27)

___

Expand All @@ -65,7 +65,7 @@ Define a React Provider for the current PluginModule

#### Defined in

[packages/reactant-module/src/core/plugin.ts:52](https://github.com/unadlib/reactant/blob/4ec91913/packages/reactant-module/src/core/plugin.ts#L52)
[packages/reactant-module/src/core/plugin.ts:52](https://github.com/unadlib/reactant/blob/30b550e1/packages/reactant-module/src/core/plugin.ts#L52)

## Methods

Expand All @@ -87,7 +87,7 @@ As hook after combine rootReducers

#### Defined in

[packages/reactant-module/src/core/plugin.ts:47](https://github.com/unadlib/reactant/blob/4ec91913/packages/reactant-module/src/core/plugin.ts#L47)
[packages/reactant-module/src/core/plugin.ts:47](https://github.com/unadlib/reactant/blob/30b550e1/packages/reactant-module/src/core/plugin.ts#L47)

___

Expand All @@ -109,7 +109,7 @@ As hook after createStore

#### Defined in

[packages/reactant-module/src/core/plugin.ts:37](https://github.com/unadlib/reactant/blob/4ec91913/packages/reactant-module/src/core/plugin.ts#L37)
[packages/reactant-module/src/core/plugin.ts:37](https://github.com/unadlib/reactant/blob/30b550e1/packages/reactant-module/src/core/plugin.ts#L37)

___

Expand All @@ -131,7 +131,7 @@ As hook before combine rootReducers

#### Defined in

[packages/reactant-module/src/core/plugin.ts:42](https://github.com/unadlib/reactant/blob/4ec91913/packages/reactant-module/src/core/plugin.ts#L42)
[packages/reactant-module/src/core/plugin.ts:42](https://github.com/unadlib/reactant/blob/30b550e1/packages/reactant-module/src/core/plugin.ts#L42)

___

Expand All @@ -153,4 +153,4 @@ preloaded state handler for Redux

#### Defined in

[packages/reactant-module/src/core/plugin.ts:20](https://github.com/unadlib/reactant/blob/4ec91913/packages/reactant-module/src/core/plugin.ts#L20)
[packages/reactant-module/src/core/plugin.ts:20](https://github.com/unadlib/reactant/blob/30b550e1/packages/reactant-module/src/core/plugin.ts#L20)
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ custom_edit_url: null

#### Defined in

[packages/reactant-module/src/core/view.ts:12](https://github.com/unadlib/reactant/blob/4ec91913/packages/reactant-module/src/core/view.ts#L12)
[packages/reactant-module/src/core/view.ts:12](https://github.com/unadlib/reactant/blob/30b550e1/packages/reactant-module/src/core/view.ts#L12)

## Properties

Expand All @@ -33,7 +33,7 @@ Service.\_\_@identifierKey@102414

#### Defined in

[packages/reactant-module/src/core/view.ts:8](https://github.com/unadlib/reactant/blob/4ec91913/packages/reactant-module/src/core/view.ts#L8)
[packages/reactant-module/src/core/view.ts:8](https://github.com/unadlib/reactant/blob/30b550e1/packages/reactant-module/src/core/view.ts#L8)

___

Expand All @@ -47,7 +47,7 @@ Service.\_\_@storeKey@102401

#### Defined in

[packages/reactant-module/src/core/view.ts:10](https://github.com/unadlib/reactant/blob/4ec91913/packages/reactant-module/src/core/view.ts#L10)
[packages/reactant-module/src/core/view.ts:10](https://github.com/unadlib/reactant/blob/30b550e1/packages/reactant-module/src/core/view.ts#L10)

## Methods

Expand All @@ -69,4 +69,4 @@ React function component defined by the current ViewModule

#### Defined in

[packages/reactant-module/src/core/view.ts:28](https://github.com/unadlib/reactant/blob/4ec91913/packages/reactant-module/src/core/view.ts#L28)
[packages/reactant-module/src/core/view.ts:28](https://github.com/unadlib/reactant/blob/30b550e1/packages/reactant-module/src/core/view.ts#L28)
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ typeof `__class`

#### Defined in

[packages/reactant-module/src/core/applyMiddleware.ts:30](https://github.com/unadlib/reactant/blob/4ec91913/packages/reactant-module/src/core/applyMiddleware.ts#L30)
[packages/reactant-module/src/core/applyMiddleware.ts:30](https://github.com/unadlib/reactant/blob/30b550e1/packages/reactant-module/src/core/applyMiddleware.ts#L30)
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,4 @@ expect(app.instance.count).toBe(1);

#### Defined in

[packages/reactant-module/src/core/createState.ts:45](https://github.com/unadlib/reactant/blob/4ec91913/packages/reactant-module/src/core/createState.ts#L45)
[packages/reactant-module/src/core/createState.ts:45](https://github.com/unadlib/reactant/blob/30b550e1/packages/reactant-module/src/core/createState.ts#L45)
2 changes: 1 addition & 1 deletion website/docs/api/reactant-module/modules/core_dispatch.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,4 @@ expect(app.instance.count).toBe(1);

#### Defined in

[packages/reactant-module/src/core/dispatch.ts:47](https://github.com/unadlib/reactant/blob/4ec91913/packages/reactant-module/src/core/dispatch.ts#L47)
[packages/reactant-module/src/core/dispatch.ts:47](https://github.com/unadlib/reactant/blob/30b550e1/packages/reactant-module/src/core/dispatch.ts#L47)
2 changes: 1 addition & 1 deletion website/docs/api/reactant-module/modules/core_load.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ custom_edit_url: null

#### Defined in

[packages/reactant-module/src/interfaces.ts:219](https://github.com/unadlib/reactant/blob/4ec91913/packages/reactant-module/src/interfaces.ts#L219)
[packages/reactant-module/src/interfaces.ts:219](https://github.com/unadlib/reactant/blob/30b550e1/packages/reactant-module/src/interfaces.ts#L219)
2 changes: 1 addition & 1 deletion website/docs/api/reactant-module/modules/core_subscribe.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,4 @@ const app = testBed({

#### Defined in

[packages/reactant-module/src/interfaces.ts:142](https://github.com/unadlib/reactant/blob/4ec91913/packages/reactant-module/src/interfaces.ts#L142)
[packages/reactant-module/src/interfaces.ts:142](https://github.com/unadlib/reactant/blob/30b550e1/packages/reactant-module/src/interfaces.ts#L142)
2 changes: 1 addition & 1 deletion website/docs/api/reactant-module/modules/core_watch.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,4 @@ const app = testBed({

#### Defined in

[packages/reactant-module/src/interfaces.ts:179](https://github.com/unadlib/reactant/blob/4ec91913/packages/reactant-module/src/interfaces.ts#L179)
[packages/reactant-module/src/interfaces.ts:179](https://github.com/unadlib/reactant/blob/30b550e1/packages/reactant-module/src/interfaces.ts#L179)
4 changes: 2 additions & 2 deletions website/docs/api/reactant-module/modules/decorators_action.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ expect(app.instance.count).toBe(1);

#### Defined in

[packages/reactant-module/src/decorators/action.ts:47](https://github.com/unadlib/reactant/blob/4ec91913/packages/reactant-module/src/decorators/action.ts#L47)
[packages/reactant-module/src/decorators/action.ts:47](https://github.com/unadlib/reactant/blob/30b550e1/packages/reactant-module/src/decorators/action.ts#L47)

___

Expand All @@ -76,4 +76,4 @@ ___

#### Defined in

[packages/reactant-module/src/decorators/action.ts:17](https://github.com/unadlib/reactant/blob/4ec91913/packages/reactant-module/src/decorators/action.ts#L17)
[packages/reactant-module/src/decorators/action.ts:17](https://github.com/unadlib/reactant/blob/30b550e1/packages/reactant-module/src/decorators/action.ts#L17)
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,4 @@ expect(app.instance.list).toEqual(['apple']);

#### Defined in

[packages/reactant-module/src/decorators/autobind.ts:42](https://github.com/unadlib/reactant/blob/4ec91913/packages/reactant-module/src/decorators/autobind.ts#L42)
[packages/reactant-module/src/decorators/autobind.ts:42](https://github.com/unadlib/reactant/blob/30b550e1/packages/reactant-module/src/decorators/autobind.ts#L42)
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,4 @@ class Shop {

#### Defined in

[packages/reactant-module/src/decorators/computed.ts:28](https://github.com/unadlib/reactant/blob/4ec91913/packages/reactant-module/src/decorators/computed.ts#L28)
[packages/reactant-module/src/decorators/computed.ts:28](https://github.com/unadlib/reactant/blob/30b550e1/packages/reactant-module/src/decorators/computed.ts#L28)
Original file line number Diff line number Diff line change
Expand Up @@ -110,4 +110,4 @@ expect(fooBar.instance.foo.getValue()).toBe('foo');

#### Defined in

[packages/reactant-module/src/decorators/injectable.ts:80](https://github.com/unadlib/reactant/blob/4ec91913/packages/reactant-module/src/decorators/injectable.ts#L80)
[packages/reactant-module/src/decorators/injectable.ts:80](https://github.com/unadlib/reactant/blob/30b550e1/packages/reactant-module/src/decorators/injectable.ts#L80)
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ custom_edit_url: null

#### Defined in

[packages/reactant-module/src/decorators/lazy.ts:6](https://github.com/unadlib/reactant/blob/4ec91913/packages/reactant-module/src/decorators/lazy.ts#L6)
[packages/reactant-module/src/decorators/lazy.ts:6](https://github.com/unadlib/reactant/blob/30b550e1/packages/reactant-module/src/decorators/lazy.ts#L6)
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@ expect(app.instance.count).toBe(0);

#### Defined in

[packages/reactant-module/src/decorators/state.ts:26](https://github.com/unadlib/reactant/blob/4ec91913/packages/reactant-module/src/decorators/state.ts#L26)
[packages/reactant-module/src/decorators/state.ts:26](https://github.com/unadlib/reactant/blob/30b550e1/packages/reactant-module/src/decorators/state.ts#L26)
Loading

0 comments on commit e96a11e

Please sign in to comment.