You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This function generates React `<meta>` and `<link />` elements, so it is compatible with React packages like [`react-helmet`](https://www.npmjs.com/package/react-helmet).
64
64
65
-
For a complete example take a look at our [examples directory](https://github.com/datocms/react-datocms/tree/master/examples).
66
-
67
65
```js
68
66
importReactfrom'react';
69
67
import { renderMetaTags } from'react-datocms';
68
+
import { Helmet } from'react-helmet';
70
69
71
70
functionPage({ data }) {
72
71
return (
@@ -79,6 +78,28 @@ function Page({ data }) {
79
78
}
80
79
```
81
80
81
+
In React 19+, you can also directly use meta tags in JSX without any external libraries: https://react.dev/blog/2024/12/05/react-19#support-for-metadata-tags
0 commit comments