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.
@goodhood/helpers
Advanced tools
@goodhood/tracking
Declarative tracking for react apps
Split up tracking payload setup from the actual tracking call. Avoids leaking data across the whole app.
npm i @goodhood/tracking
import { TrackingProvider } from '@goodhood/tracking';
const handleEvent = (payload) => {
sendAnalyticsEvent(payload);
};
<TrackingProvider onEvent={handleEvent}>
...
</TrackingProvider>
npm run start
trackingProvider.track(payload)
event
keyuseTrack
returns a function that forwards to trackingProvider.track(payload)
import { useTrack } from '@goodhood/tracking';
export default {
const track = useTrack();
return (
<button
type="button"
onClick={() => { track({ event: 'button-clicked' }); }}
>
track now
</button>
);
}
class ClassComponent extends PureComponent {
constructor(props) {
super(props);
this.handleClick = this.handleClick.bind(this);
}
handleClick() {
this.provider.track({ event: 'button-clicked' });
}
render() {
return (
<>
<Provider ref={(provider) => { this.provider = provider; }} />
<button type="button" onClick={this.handleClick} className="ui-button ui-button-primary">
press me to track (check console)
</button>
</>
);
}
}
TrackingTrigger
accepts any kind of props. All props will be forwarded as payload to track(payload)
.
import { TrackingTrigger } from '@goodhood/tracking';
<TrackingTrigger event="pageload" additional-data={123} />
<Provider email="fun@mail.at">
<Provider funnel="Post creation" any-kind-of-prop="oh yes">
<TrackButton />
</Provider>
</Provider>
TrackingProvider
TrackingProvider
accepts the following props:
onEvent
: Called whenever the provider receives a track(payload)
call. Either directly or coming from a TrackingProvider
inside children.transform
: Allows to change payloads before they are sent to the parent TrackingProvider
(or to onEvent
) (check stories for detailed examples)TrackingProvider
allows imperative access to:
track(payload)
as described aboveFAQs
shared helpers for Good Hood applications
We found that @goodhood/helpers demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 6 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.
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.