Thanks for the cool suggestion and I have mentioned the filter() method also.
But yeah when immutability comes in picture you should always use methods which returns new arrays and doesn't affect original one.
Use deep cloning for objects or arrays passed as props if you still want to directly change the prop like using splice().
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Thanks for the cool suggestion and I have mentioned the filter() method also.
But yeah when immutability comes in picture you should always use methods which returns new arrays and doesn't affect original one.
Use deep cloning for objects or arrays passed as props if you still want to directly change the prop like using splice().