Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
automerge-repo-solid-primitives
Advanced tools
Helpers for using <img alt="" src=.assets/automerge.png width=22 height=22> Automerge with <img alt="" src=.assets/solid.png width=22 height=22> SolidJS .
A convenience context for Automerge-Repo Solid apps. Optional: if you prefer you
can pass a repo as an option to useHandle
or useDocument
.
<RepoContext.Provider repo={Repo}>
<App />
</RepoContext.Provider>
Get the repo from the context.
useRepo(): Repo
let repo = useRepo()
Get a handle from the repo as a resource.
useHandle<T>(
() => AnyDocumentId,
options?: {repo: Repo}
): Resource<Handle<T>>
let handle = useHandle(id)
// or
let handle = useHandle(id, {repo})
The repo
option can be left out if you are using RepoContext.
Get a document and change function from the repo as a resource.
useDocument<T>(
() => AnyDocumentId,
options?: {repo: Repo}
): [Resource<T>, (fn: changeFn<T>) => void]
let [doc, change] = useDocument(id)
// or
let [doc, change] = useDocument(id, {repo})
The repo
option can be left out if you are using RepoContext.
Create a store for a handle's document. It's subscribed to the handle's changes, and converts incoming automerge operations to store updates, providing fine-grained reactivity that's consistent across space and time.
createDocumentStore<T>(
() => Handle<T>
): Resource<Doc<T>>
let handle = useHandle(id, {repo})
let doc = createDocumentStore(handle)
return <h1>{doc.items[1].title}</h1>
FAQs
automerge-repo primitives for your solidjs app
We found that automerge-repo-solid-primitives demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.