Suggestion: Only warn with `(...) is an action and will not persist` in dev (verbose) mode
ThaJay opened this issue · 1 comments
Perhaps I have misunderstood, and in that case I would love to be enlightened, but It seems expected behaviour that actions are not persisted as mentioned in the docs.
At the moment, many of the actions in our project are arrow functions, so they are class properties instead of methods. I have given the properties config of Object.keys(this)
because I do not want to manually name dozens of properties on dozens of stores and then maintain those lists and the docs state properties to be a required config. It would be nice to have this config optional and have it take Object.keys(this)
by default, but that is fine by me because the end-user will never see this.
The console warnings though, I can not easily get rid of without explicitly ignoring them.
What are your thoughts and feelings about this issue?
Hello and thank for the question!
Try to use something like this Object.keys(this).filter((it) => typeof this[it] !== 'function')
because your problem is not about library. The main approach is using named properties in configuration