Gathering detailed insights and metrics for reatom-solid
Gathering detailed insights and metrics for reatom-solid
Gathering detailed insights and metrics for reatom-solid
Gathering detailed insights and metrics for reatom-solid
npm install reatom-solid
Typescript
Module System
Node Version
NPM Version
62.2
Supply Chain
93.4
Quality
75.9
Maintenance
100
Vulnerability
100
License
TypeScript (100%)
Total Downloads
1,900
Last Day
1
Last Week
1
Last Month
17
Last Year
221
14 Stars
40 Commits
1 Forks
2 Watching
3 Branches
1 Contributors
Latest Version
2.0.1
Package Id
reatom-solid@2.0.1
Unpacked Size
16.91 kB
Size
4.59 kB
File Count
12
NPM Version
9.5.0
Node Version
18.14.2
Publised On
20 Oct 2023
Cumulative downloads
Total Downloads
Last day
0%
1
Compared to previous day
Last week
-50%
1
Compared to previous week
Last month
142.9%
17
Compared to previous month
Last year
-52.7%
221
Compared to previous year
2
4
Solid bindings package for Reatom store.
Please use official adapter
npm i reatom-solid
or
1yarn add reatom-solid
reatom-solid
depends on and works with@reatom/core
andsolid-js
.
Connects the atom to the store represented in context and returns the state of the atom from the store (or default atom state).
1const [atomValue] = useAtom(atom)
1const atomValue = useAtom(atom, atomState => atomState[props.id]) 2const atomValue = createMemo(() => { 3 const atom = createAtom({ dataAtom }, ({ get }) => get("dataAtom")[props.id]); 4 const [value] = useAtom(atom); 5 return value; 6});
Binds action with dispatch to the store provided in the context.
1const handleUpdateData = useAction(dataAtom.update)
1const handleUpdateData = useAction((value) => dataAtom.update({ id: props.id, value }))
If action creator don't return an action dispatch not calling.
1const handleUpdateData = useAction((payload) => { 2 if (condition) return dataAtom.update(payload) 3})
1// App 2 3import { createStore } from '@reatom/core' 4import { reatomContext } from 'reatom-solid' 5import { Form } from './components/Form' 6 7import './App.css' 8 9export const App = () => { 10 // create statefull context for atoms execution 11 const store = createStore() 12 13 return ( 14 <div className="App"> 15 <reatomContext.Provider value={store}> 16 <Form /> 17 </reatomContext.Provider> 18 </div> 19 ) 20}
1// components/Form 2 3import { createPrimitiveAtom } from '@reatom/core/primitives' 4import { useAtom } from 'reatom-solid' 5 6const nameAtom = createPrimitiveAtom('', { 7 onChange: (e) => e.currentTarget.value, 8}) 9 10export const Form = () => { 11 const [name, { onChange }] = useAtom(nameAtom) 12 13 return ( 14 <form> 15 <label htmlFor="name">Enter your name</label> 16 <input id="name" value={name} onChange={onChange} /> 17 </form> 18 ) 19}
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
2 existing vulnerabilities detected
Details
Reason
SAST tool detected but not run on all commits
Details
Reason
project is archived
Details
Reason
Found 0/12 approved changesets -- score normalized to 0
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Score
Last Scanned on 2024-12-16
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More