MCPcopy Create free account
hub / github.com/atomicdata-dev/atomic-data-browser / save

Function save

react/src/hooks.ts:262–269  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

260 if (commit && touched) {
261 // This weird async wrapping is needed to use await in a react hook.
262 async function save() {
263 try {
264 setTouched(false);
265 await resource.save(store, store.getAgent());
266 } catch (e) {
267 store.handleError(e);
268 }
269 }
270 save();
271 }
272 }, [JSON.stringify(debounced)]);

Callers 1

useValueFunction · 0.70

Calls 3

saveMethod · 0.80
getAgentMethod · 0.80
handleErrorMethod · 0.80

Tested by

no test coverage detected