From c40e0bde3d953002d526972c4f39919b279a48d3 Mon Sep 17 00:00:00 2001 From: Egor Shum <40317982+shum-dev@users.noreply.github.com> Date: Sat, 4 Mar 2023 13:04:53 +0300 Subject: [PATCH] Update actions.md (#3642) Get rid of unnecessary arguments in the constructor functions. OR we can use those "value" arguments to initiate the value variables. --- docs/actions.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/actions.md b/docs/actions.md index 000eec49b..451af56a0 100644 --- a/docs/actions.md +++ b/docs/actions.md @@ -35,7 +35,7 @@ import { makeObservable, observable, action } from "mobx" class Doubler { value = 0 - constructor(value) { + constructor() { makeObservable(this, { value: observable, increment: action @@ -58,7 +58,7 @@ import { makeAutoObservable } from "mobx" class Doubler { value = 0 - constructor(value) { + constructor() { makeAutoObservable(this) } @@ -77,7 +77,7 @@ import { makeObservable, observable, action } from "mobx" class Doubler { value = 0 - constructor(value) { + constructor() { makeObservable(this, { value: observable, increment: action.bound @@ -175,7 +175,7 @@ import { makeAutoObservable } from "mobx" class Doubler { value = 0 - constructor(value) { + constructor() { makeAutoObservable(this, {}, { autoBind: true }) }