
Security News
Anthropic Identifies Biased Reasoning and Recklessness as Drivers of Claude’s PyPI Attack
Anthropic found biased reasoning and recklessness drove Claude Mythos 5 to publish malware on PyPI and compromise a security vendor.
@jsonjoy.com/collaborative-react
Advanced tools
React hooks, context helpers, and lightweight render-prop components for binding
React UI to json-joy CRDT models and nodes.
npm install json-joy @jsonjoy.com/collaborative-react react
Model and NodeApiUseModel, UseNode) for declarative subscriptionsimport * as React from 'react';
import {ModelCtx, useModelView, useStr} from '@jsonjoy.com/collaborative-react';
import {Model} from 'json-joy/lib/json-crdt';
const model = Model.create({title: 'Hello'});
function TitleEditor() {
const root = useModelView();
const title = useStr('/title');
return (
<div>
<p>{root.title}</p>
<button onClick={() => title?.ins(title.view().length, '!')}>Append !</button>
</div>
);
}
export const App = () => (
<ModelCtx model={model}>
<TitleEditor />
</ModelCtx>
);
ModelCtx: provides a Model via contextNodeCtx: provides a NodeApi via contextWhen using ModelCtx, both the model and model.api are available to hooks.
useCtxModel() / useCtxNode(): optional context access (can return undefined)useCtxModelStrict() / useCtxNodeStrict(): strict access (throws if missing)Use createNodeCtx() when you need a separate, isolated node/model context in the
same component tree.
useModelTick(model?): subscribe to every model tickuseModelView(model?): subscribe to model view snapshotuseModel(selector, model?): derive reactive values from modeluseModelTry(selector, model?): safe variant returning undefined on selector erroruseNodeEvents(event, listener, node?): subscribe to node events (self, child, subtree)useNodeEffect(event, listener, node?): effect wrapper with auto-unsubscribeuseNodeChange(event, node?): re-render on node change, returns last ChangeEventuseNode(node?, event?): subscribe and return nodeuseNodeView(node?, event?): subscribe and return node viewusePath(path, node?, event?): read nested node by pathusePathView(path, node?, event?): read nested node view by pathuseObj(path?, node?, event?): typed object node hookuseArr(path?, node?, event?): typed array node hookuseStr(path?, node?, event?): typed string node hookUseModelRender-prop component that re-renders when model changes.
import {UseModel} from '@jsonjoy.com/collaborative-react';
<UseModel
model={model}
render={(m) => <pre>{JSON.stringify(m.api.view(), null, 2)}</pre>}
/>
UseNodeRender-prop component that re-renders on node events.
import {UseNode} from '@jsonjoy.com/collaborative-react';
<UseNode
node={model.s.$}
event="subtree"
render={(node) => <pre>{JSON.stringify(node.view(), null, 2)}</pre>}
/>
ModelCtx or NodeCtx.useModelView only re-renders when the view identity changes, while
useModelTick re-renders on every model change.FAQs
JSON CRDT React.js hooks, components, and types
The npm package @jsonjoy.com/collaborative-react receives a total of 39 weekly downloads. As such, @jsonjoy.com/collaborative-react popularity was classified as not popular.
We found that @jsonjoy.com/collaborative-react demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.

Security News
Anthropic found biased reasoning and recklessness drove Claude Mythos 5 to publish malware on PyPI and compromise a security vendor.

Research
/Security News
Malicious Chrome and Firefox extensions target Axiom Trade and Padre users, stealing session tokens and wallet data.

Security News
GPT-6 Astra hits 100% on ExploitBench and finds zero-days autonomously, while independent tests reveal scope violations and monitoring gaps.