Closed connor-odoherty closed 4 years ago
Welcome to your feedback : )
The type is the schema of model.
You will see the warning if using the old schema whether you are using TypeScript.
In order to avoid the warning, you should use the new schema of model:
const model = {
actions: {
// The order of params change
increment: async (payload, { state, actions }) => {
return {
counter: state.counter + (params || 1)
}
},
},
state: initialState
}
// You need to wrap Model when export
export default Model(model)
Close the issue because the console.warn has been removed in v3.0.0 : )
Upon startup, I always see an error along the lines of "We recommend you to use NextModel now...".
Is this just a 'type' error? As in, does it warn if a model is not defined as the NextModel type?
And if so, is it possible to avoid that error if not using TypeScript?