JSFiddle - React, Tailwind, and code Playground

by Salmin Skenderovic

JavaScript

const state = {
	cart: {
  	orderLines: []
  }
}


let newState = {...state};
newState.cart.orderLines.push("new item");

return newState;