Closed MarvinAmador7 closed 3 years ago
Isn't it just how JS works?
const addData = ({ name, dataset }: DataSet) => {
if (!state.sets[name]) {
state.sets[name] = {}
}
state.sets[name].dataset = [...dataset, ...state.sets[name].dataset]
}
Closing as answered. Feel free to continue discussion.
Hi,
I got into a situation where I'm loading datasets into a Valtio proxy, but since I'm using dynamic property keys to store the dataset I'm getting the following error:
TypeError: Cannot read property 'dataset' of undefined
I think this has something to do with how the proxies work.
This is the whole code:
Any thoughts about what I’m missing?