User Tools

Site Tools


ember-autotracking-object-arrays

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision Both sides next revision
ember-autotracking-object-arrays [2023/09/20 04:38]
sausage
ember-autotracking-object-arrays [2023/09/20 04:43]
sausage
Line 15: Line 15:
     "​start":​ "ember serve --port 4300",     "​start":​ "ember serve --port 4300",
   
-Here is some styling to make the demo more pleasant to look at. Edit: app\styles\app.css+Here is some styling to make the demo more pleasant to look at. Edit: ''​app\styles\app.css''​
  
 <code css> <code css>
Line 257: Line 257:
 </​code>​ </​code>​
  
-Click the Change Content button, and it doesn'​t work. Any why not? To Ember, the array hasn't changed. It's not shorter or longer, it has no idea what has happened. Even though the values inside each object have been changed, the spread operator is not a deep copy and Ember'​s auto tracking won't see it.+Click the Change Content button. It doesn'​t work. Any why not? To Ember, the array hasn't changed. It's not shorter or longer, it has no idea what has happened. Even though the values inside each object have been changed, the spread operator is not a deep copy and Ember'​s auto tracking won't see it.
  
 ===== Solve with stringify/​parse ===== ===== Solve with stringify/​parse =====
Line 276: Line 276:
 </​code>​ </​code>​
  
-This is probably the fastest and easiest take-home fix for tracking object arrays in Ember. ​But there are other options ​too which are worth exploring. ​But maybe for another time.+This is probably the fastest and easiest take-home fix for tracking object arrays in Ember. ​There are other options worth exploring, but not as simpleMaybe for another time.
  
 {{ :​ember:​boxes-02.png?​nolink |}} {{ :​ember:​boxes-02.png?​nolink |}}
ember-autotracking-object-arrays.txt ยท Last modified: 2023/09/20 04:53 by sausage