如何被动地获取数据?之后,我需要将数据插入图形to中,使用createResource钩子,我只获得与solid For循环一起工作的数据,我做错了什么?
ps:很新的固体
发布于 2022-06-17 17:30:39
您可以使用类似这样的效果来反应性地使用资源中的数据,这与内部的效果类似:
// `data` starts undefined, then later resolves
const [data] = createResource(...);
createEffect(() => {
if (data()) {
// Do something with the data
}
});https://stackoverflow.com/questions/72662675
复制相似问题