Server: Phase 2 (REVIEW not respected yet)
This commit is contained in:
1 parent
5d16ded553
commit
142b47674d
4271 files changed
+1203269
No files matched your search
+15
@@ -0,0 +1,15 @@
|
||||
import { createAtom } from "@tanstack/store";
|
||||
import { useState } from "react";
|
||||
|
||||
//#region src/useCreateAtom.ts
|
||||
function useCreateAtom(valueOrFn, options) {
|
||||
const [atom] = useState(() => {
|
||||
if (typeof valueOrFn === "function") return createAtom(valueOrFn, options);
|
||||
return createAtom(valueOrFn, options);
|
||||
});
|
||||
return atom;
|
||||
}
|
||||
|
||||
//#endregion
|
||||
export { useCreateAtom };
|
||||
//# sourceMappingURL=useCreateAtom.js.map
|
||||
Reference in new issue
Block a user