Closed krawaller closed 3 years ago
This pull request is automatically built and testable in CodeSandbox.
To see build info of the built libraries, click here or the icon next to each commit SHA.
Latest deployment of this branch, based on commit 9411f25d3cd8312ba0256435c6a44b2887eeae89:
Sandbox | Source |
---|---|
React | Configuration |
React Typescript | Configuration |
@merisbahti I also see this as a preparatory step for the dev tools support; by having clearer atom construction code it will be easier to add eventual new parameters ("store" id, atom description, etc) needed for dev tools.
Here's a take on cleaning up the structure and return typings in
atom.ts
:basicAtom
functionderivedAtom
functioncustomAtom
functionatomConstructor
atom
into simply returningbasicAtom
,derivedAtom
orcustomAtom
depending on inputatom
(this "passes" both on master and on this branch)No behaviour change, this is all about tidying up types and making the code easier to reason about.