T

Tagtics

Overview

  • Introduction
  • Features
  • Tech Stack

Implementations

  • Client Overview
  • React / Next.js
  • Vue 3
  • Angular
  • Svelte
  • Solid.js
  • Vanilla JS / HTML
Docs
Back to App
ImplementationsSolid.js
Implementation Guide

Solid.js Integration

Integrate Tagtics using modern lifecycle hooks. The client automatically handles route changes for you.

Initialization

Call init when your app mounts and destroy when it unmounts to prevent memory leaks.

import { onMount, onCleanup } from 'solid-js';

function App() {
  onMount(() => {
    const script = document.createElement('script');
    script.src = 'https://cdn.tagtics.online/client.js';
    script.async = true;
    script.onload = () => {
      window.Tagtics?.init({ apiKey: 'YOUR_API_KEY' });
    };
    document.body.appendChild(script);

    onCleanup(() => {
      window.Tagtics?.destroy();
      script.remove();
    });
  });

  return <YourApp />;
}