Skip to content

Commit

Permalink
Make addDisposer public (#88)
Browse files Browse the repository at this point in the history
* make addDisposer public

* resolve react version

* doc add dispose

* add addDisposer to IState

* remove addDisposer from IState
  • Loading branch information
lzfee0227 authored Nov 8, 2022
1 parent dd82956 commit fca7ebb
Show file tree
Hide file tree
Showing 5 changed files with 5,928 additions and 7,126 deletions.
4 changes: 3 additions & 1 deletion dumi/docs/concepts/state/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ export interface IState<V> {
validate(): Promise<ValidateResult<V>>
/** Configure when state should be disabled. */
disableWhen(predictFn: () => boolean): this
/** Do dispose. */
dispose(): void
}
```

Expand Down Expand Up @@ -92,7 +94,7 @@ That's why there's a boolean field `activated` for states.

States will not be auto-validated until it becomes **activated**. And they will become (and stay) activated if one of these happens:

1. Value changed by user interactions (method `onChange()` is called).
1. Value changed by user interactions (method `onChange()` is called).
2. State imperatively validated (method `validate()` is called).

### Own Error
Expand Down
Loading

0 comments on commit fca7ebb

Please sign in to comment.