solidjs / solid-meta

Write meta tags to the document head
127 stars 16 forks source link

its not working at all? #42

Closed huseeiin closed 7 months ago

huseeiin commented 7 months ago

I copied this example from the README:

import { MetaProvider, Title, Link, Meta } from '@solidjs/meta';

const App = () => (
  <MetaProvider>
    <div class="Home">
      <Title>Title of page</Title>
      <Link rel="canonical" href="http://solidjs.com/" />
      <Meta name="example" content="whatever" />
      // ...
    </div>
  </MetaProvider>
);

this is the index.tsx:

/* @refresh reload */
import { render } from "solid-js/web";

import { App } from "./App";
import { MetaProvider } from "@solidjs/meta";

const root = document.getElementById("a");

if (root) {
  render(
    () => (
      <MetaProvider>
        <App />
      </MetaProvider>
    ),
    root
  );
}
huseeiin commented 7 months ago

i had to remove <title> in index.html