mirror of
https://github.com/hanzoai/insights-js.git
synced 2026-11-03 00:53:53 +00:00
Bulk rename across 989 files: - Package names: posthog-js → @hanzo/insights, posthog-node → @hanzo/insights-node, etc. - Repository URLs: posthog/posthog-js → hanzoai/insights-js - Brand names: PostHog → Insights - File renames: 259 reference JSON files, source files, workflow files - Directory rename: eslint-plugin-posthog-js → eslint-plugin-insights Remaining: 8 refs to @posthog/rrweb-* (real npm deps, need fork+publish)
986 B
986 B
Insights State Management Logging Examples
This is a comparison of Insights logging integrations with different state management libraries using a todo list application built with Next.js.
Examples Included
- Redux: Uses Redux Toolkit with
insightsReduxLoggermiddleware - Kea: Uses Kea with
insightsKeaLoggerplugin (cleaner API)
To run it
pnpm i && pnpm dev
Then visit:
- Home: http://localhost:3000/ - Overview and links to examples
- Redux: http://localhost:3000/redux - Redux Toolkit + Insights logging
- Kea: http://localhost:3000/kea - Kea + Insights logging
Features Demonstrated
- Action and state logging with Insights
- Rate limiting to prevent log flooding
- State diffing (only log changed values)
- Action/state masking for sensitive data
- Performance monitoring (slow action detection)
- Different API styles (Redux-specific vs generic)
Apologies to the future traveller, the example todo app is entirely AI slop