State not updating in nested object(solved)

I'm making a card game and trying to make a modification on a card.
My schema struct is somewhat like that:

field -> rows -> spots -> playerCard

My problem is, when I try to modify the object, the schema don't update, but when I move my card in the field for example, the values that I applied to the card finally appears.

I'm modifying the state like that:

One workaround that I've been using is creating and entire new spot object (parent of my playerCard) and assiging it, this way the schema is properly updated.

The workaround is like this:
const tempSpot = new FieldSpot(spot.index, spot.ownerType)
tempSpot.playerCard = spot.playerCard
this.state.field.rows[rowIndex].spots[spotIndex] = tempSpot

Is there a way to make the state update without creating a new object?
I tried cloning the object with javascript spread operator, but that don't work for schemas, since spread just copy the enumerated values of an object.

Thanks in advance.

Hi @arturspon,

Do you possibly re-use Schema instances? Depending on how the schema instance is being moved around (or re-used) within the state, the client-side callback may not trigger the way you expected, unfortunately. If you can provide a minimal reproduction example with your scenario it could help us understand the specific issue you're having.

You could potentially use spot.clone() to make sure a new object is created when sharing the instance is necessary

Hope this helps, cheers!