We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cba6f24 commit aa33c1aCopy full SHA for aa33c1a
README.md
@@ -822,11 +822,14 @@ actions: {
822
823
### How can I customize each model's middlewares?
824
825
-If you are using NextModel, you can customize each model's middlewares.
+You can customize each model's middlewares.
826
827
```typescript
828
import { actionMiddlewares, Model } from 'react-model'
829
-import { delayMiddleware } from './middlewares'
+const delayMiddleware: Middleware = async (context, restMiddlewares) => {
830
+ await timeout(1000, {})
831
+ context.next(restMiddlewares)
832
+}
833
834
const nextCounterModel: NextModelType<CounterState, NextCounterActionParams> = {
835
actions: {
0 commit comments