
Security News
Risky Biz Podcast: Making Reachability Analysis Work in Real-World Codebases
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
@fobx/core
Advanced tools
The behavior of @fobx/core is almost identical to that of mobx with respect to the critical path of behavior. Meaning it passes all of the mobx unit tests with respect to observable values, computed values, reactions and transactions (once API differences have been accounted for).
Because of this functional equivalence, almost all of the mobx documentation and stack overflow questions found for mobx are applicable to @fobx/core. The following are the notable differences that are needed in order to get started:
Fobx has two methods for creating observable state, observable
and
observableBox
functions.
import { observable, observableBox } from "@fobx/core"
const num = observableBox(1)
const str = observableBox("hello fobx")
const bool = observableBox(true)
const arr = observable([1, 2, 3])
const map = observable(
new Map([
["a", "a"],
["b", "b"],
]),
)
const set = observable(new Set([1, 2, 3]))
const obj = observable({ a: 1, b: 2 })
class A {
a = 1
constructor() {
this.b = 2
// acts like mobx's makeAutoObservable
observable(this)
}
}
observableBox
is needed when making a primitive type observable. When this
happens you get and set the value through the .value
property.
import { observableBox } from "@fobx/core"
const a = observableBox(1)
console.log(a.value) // prints 1
a.value = 5
console.log(a.value) // prints 5
Observable values are tracked immediately instead of waiting until the end of the reaction body.
const o = observableBox(0);
const seen: number[] = [];
autorun(() => {
seen.push(o.value);
if (o.value < 3) o.value += 1;
});
console.log(seen); // prints [0,1,2,3] ... mobx will have [0]
o.value += 1;
console.log(seen) // prints [0,1,2,3,4] ... mobx will have [0,2,3,4]
observableObject
needs to handle property add + delete?TODO:
comments in the code.FAQs
Fast, reactive state management
We found that @fobx/core demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer 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.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.
Security News
CISA’s 2025 draft SBOM guidance adds new fields like hashes, licenses, and tool metadata to make software inventories more actionable.