A tree data structure that emits events on updates, even if the modification is triggered by one of the leaves, making it easier to think in a reactive way.
I have a problem appending values to frozen data array.
Let's say i have the data structure below:
var dataStore = new Freezer({
data: {
array_1: [],
int_value: 0,
array_2: [],
bool_value: false
}
});
// Now we get the data from 'dataStore' and proceed to value assignment.
var newData = dataStore.get().data;
newData.array_1.append( [1, 2, 3] );
// 'bool_value' and 'int_value' also get assigned with [1, 2, 3]. End up having the following structure:
// data: {
// array_1: [1, 2, 3],
// int_value: [1, 2, 3],
// array_2: [],
// bool_value: [1, 2, 3]
// }
Debugging step by step found that on 'frozen.js' line 361 ( if( child == oldChild ) { child = newChild; } ), the '==' should be '===' to check the data type also, so fixed it temporarily.
Hello,
I have a problem appending values to frozen data array. Let's say i have the data structure below:
var dataStore = new Freezer({ data: { array_1: [], int_value: 0, array_2: [], bool_value: false
} });
// Now we get the data from 'dataStore' and proceed to value assignment.
var newData = dataStore.get().data; newData.array_1.append( [1, 2, 3] );
// 'bool_value' and 'int_value' also get assigned with [1, 2, 3]. End up having the following structure: // data: { // array_1: [1, 2, 3], // int_value: [1, 2, 3], // array_2: [], // bool_value: [1, 2, 3]
// }
Debugging step by step found that on 'frozen.js' line 361 ( if( child == oldChild ) { child = newChild; } ), the '==' should be '===' to check the data type also, so fixed it temporarily.