Skip to content

Commit fca7ebb

Browse files
authored
Make addDisposer public (#88)
* make addDisposer public * resolve react version * doc add dispose * add addDisposer to IState * remove addDisposer from IState
1 parent dd82956 commit fca7ebb

File tree

5 files changed

+5928
-7126
lines changed

5 files changed

+5928
-7126
lines changed

dumi/docs/concepts/state/index.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ export interface IState<V> {
3737
validate(): Promise<ValidateResult<V>>
3838
/** Configure when state should be disabled. */
3939
disableWhen(predictFn: () => boolean): this
40+
/** Do dispose. */
41+
dispose(): void
4042
}
4143
```
4244

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

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

95-
1. Value changed by user interactions (method `onChange()` is called).
97+
1. Value changed by user interactions (method `onChange()` is called).
9698
2. State imperatively validated (method `validate()` is called).
9799

98100
### Own Error

0 commit comments

Comments
 (0)