Where to put <MetaProvider>

I want to use <Title> but i need to add this somewhere:
<MetaProvider>
<Title>Website Title</Title>
/MetaProvider>
<MetaProvider>
<Title>Website Title</Title>
/MetaProvider>
where do i put MetaProvider? I tried in my app.tsx file but it does not work
1 Reply
Misery
MiseryOP2w ago
i found out you can just add it on app.tsx:
import { MetaProvider, Title } from "@solidjs/meta";
import { Router } from "@solidjs/router";
import { FileRoutes } from "@solidjs/start/router";
import { Suspense } from "solid-js";
import "./app.css";
import Nav from "./components/Nav";

export default function App() {
return (
<Router
root={(props) => (
<>
<MetaProvider>
<Title>My Website</Title>
<Nav />
<Suspense>{props.children}</Suspense>
</MetaProvider>
</>
)}
>
<FileRoutes />
</Router>
);
}
import { MetaProvider, Title } from "@solidjs/meta";
import { Router } from "@solidjs/router";
import { FileRoutes } from "@solidjs/start/router";
import { Suspense } from "solid-js";
import "./app.css";
import Nav from "./components/Nav";

export default function App() {
return (
<Router
root={(props) => (
<>
<MetaProvider>
<Title>My Website</Title>
<Nav />
<Suspense>{props.children}</Suspense>
</MetaProvider>
</>
)}
>
<FileRoutes />
</Router>
);
}
Want results from more Discord servers?
Add your server