Ready
useRequest
provides an options.ready
, when its value is false, the request will never be sent.
- 1、In the automatic mode of
manual=false
, every timeready
changes fromfalse
totrue
, a request will be automatically executed with the parameteroptions.defaultParams
. - 2、When
manual=true
manual request mode, as long asready=false
, the request triggered by run/runAsync will not be executed.
Code demonstration
Options
Property | Description | Type | Default |
---|---|---|---|
ready | Is the current request ready | boolean |Ref<boolean> | true |