Closed lunacer closed 1 year ago
Hi @lunacer !
I've made a codesandbox with your code for debugging purpouses that illustrates the issue.
Going through your actions, I spottet the loginState
action, which re-assigns the whole store state
object into state.userSession.isLoggedIn
- causing a reference loop. You can see this by pressing the button in the sandbox above.
// whoops! missing payload 👇 duplicating `state` into `isLoggedIn`
loginState: action((state) => {
state.userSession.isLoggedIn = state;
}),
I'm guessing that this is not what you intended to do, but instead do something like this:
// Include payload parameter 👇
loginState: action((state, payload) => {
// Use payload instead of the state 👇
state.userSession.isLoggedIn = payload;
}),
Let me know if this resolves your issue 👍
Thank YOU so much!! This solved my issue. I completely failed to notice this while I checked the code several times.
Thank YOU so much!! This solved my issue. I completely failed to notice this while I checked the code several times.
Happy to help 👍
Hi, I'm facing "RangeError: Maximum call stack size exceeded" It's on the "clone" function in lib.js, and the error message points the location "at Function.getOwnPropertyDescriptor ()"
I'm currently on version 5.1.0
I thought it was probably my model but can't find out the issue with it. Could you take a look?
The error message is;
And my model is;
Thanks,