New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

remix-fathom

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

remix-fathom

A hook to quickly add Fathom to your Remix app.

latest
Source
npmnpm
Version
0.0.9
Version published
Maintainers
1
Created
Source

remix-fathom

This package exports the following hooks:

  • useFathom(id, opts)
  • useGoal(code, cents)

Setup

npm install remix-fathom fathom-client

fathom-client is a peer dependency.

Then in app/root.tsx, add

import { useFathom } from "remix-fathom";

useFathom("YOUR_SITE_ID", myOpts);

useFathom

Supply your Fathom site ID and optional opts object to configure fathom-client. While fathom-client is a peer dependency, the useFathom hook will set up loading and registering your tracked views each time the page changes.

useGoal

This hook returns you a memoized function pre-populated with your provided code and cents.

Thanks to Sergio Xalambrí for the inspiration!

Keywords

Remix

FAQs

Package last updated on 14 Apr 2022

Did you know?

Socket

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.

Install

Related posts