Security News
cURL Project and Go Security Teams Reject CVSS as Broken
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
marcs-observable
Advanced tools
This package is a typescript replica of @marc1's observablish-values package used on the frontend masters website for the media player.
Install Package
pnpm add marcs-observable
Code Example
import React from "react";
// import { Observable, ObservableFactory } from "marcs-observable";
import marcsObservable from "@bronifty/marcs-observable";
// creating observables outside of the component in order to preserve state when component re-renders
// this could also be done in a store and inported
const child = marcsObservable(() => 1);
const parent = marcsObservable(() => child.value + 1);
const App = () => {
const [_, setChildValue] = React.useState(child.value);
// useEffect to trigger a re-render when the child observable changes
React.useEffect(() => {
const childSubscription = child.subscribe((value) => setChildValue(value));
return () => {
childSubscription();
};
}, []);
return (
<>
<section>
<h1>test 3 - marcs-observable</h1>
<p>child.value - {child.value}</p>
<p>parent.value - {parent.value}</p>
<button onClick={() => (child.value += 1)}>child.value += 1</button>
</section>
</>
);
};
export default App;
FAQs
bronifty@gmail.com
We found that marcs-observable 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
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
Security News
Biden's executive order pushes for AI-driven cybersecurity, software supply chain transparency, and stronger protections for federal and open source systems.