tags-api-preview icon indicating copy to clipboard operation
tags-api-preview copied to clipboard

Props Mutation and Object freezing

Open Hen2609 opened this issue 3 years ago • 0 comments

Version: 0.6.1

Details

I was trying to mutate var tags through multiple ways, each way works as expected on the playground but not on local

Your Environment

macOs 13.0.1 node: 16.17

Steps to Reproduce

  1. mutating through props: github repo playground link in this example I mutate the object through props and I used a button to log the current state to see it reflected in the original object
  2. playground link - in this example I modify an array using pop. in local it throws an error can't change read only property 'length' of object.
  3. playground link - Trying to intialize array in the onMount hook, gets an error on local saying: "cannot add property 0, object is not extensible"

for examples 2 and 3, can be reproduced using the same repo in example 1

Hen2609 avatar Dec 06 '22 18:12 Hen2609