Katanal
Katanal

Reputation: 23

Make meta tag with reagent

I want to render a meta tag with Reagent.

I can not find any info with Google.

[:div (header @company-name)]

Looks like it outputs everything into body. How to write meta tags?

Upvotes: 1

Views: 184

Answers (1)

Roman Liutikov
Roman Liutikov

Reputation: 1348

If you want to render something into <head> you should do it as usual with any Reagent UI code.

(reagent.core/render [header] (.-head js/document))

The above will render into <head>. There's also NPM package that allows rendering into <head> from within your app's UI tree react-helmet.

Upvotes: 2

Related Questions