I have an object called travel which looks like this:
let travel = { id:'1', title:'DC to NY', waypoints:[1,2,3] }
and I have this 2 variables
let newTitle = 'ATL-PHX';
let newWps = [4,5,6];
and if say something like let newTravel = {...travel, title: newTitle, waypoints: newWps }
my newTravel object will look like this:
$__: {activePaths: {…}, skipId: true}
$isNew: false
title: "the new title"
waypoints: "the new waypoints"
_doc: the old travel object
Does anyone know why this happens or how can I declare the isNew = true?