Skip to content
Discussion options

You must be logged in to vote

From the docs:

title, meta or any other elements (e.g. script) need to be contained as direct children of the Head element, or wrapped into maximum one level of <React.Fragment> or arrays—otherwise the tags won't be correctly picked up on client-side navigations.

Now, it might be the case that a single .map might just work, try adding <></> around the returned <link> tags, as JSX expects only one element in returns. If it still does not work, you probably need to define each link as a direct child in Head. If it's only 3 fonts, it's not that bad either. Remember, sometimes readability outweighs "optimal". I mean, does a single map really help that much to clean up the code? Correct me, …

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
1 reply
@smugller
Comment options

Comment options

You must be logged in to vote
2 replies
@smugller
Comment options

@balazsorban44
Comment options

Answer selected by smugller
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
3 participants