#Appending to Head using a component?

5 messages Β· Page 1 of 1 (latest)

pale hinge
#

Hi there πŸ‘‹ ,

For a project I have created a custom Image component, which I want to preload the data through the head when a certain prop is set. In the pages-implementation of Next I could use <Head> to set this link in the head of the document through the component - however, I don't see a way to do this using the app directory - since <Head> is not supported there.

How would I go about this, if at all?

dusty muralBOT
#

πŸ”Ž This post has been indexed in our web forum and will be seen by search engines so other users can find it outside Discord

πŸ•΅οΈ Your user profile is private by default and won't be visible to users outside Discord, if you want to be visible in the web forum you can add the "Public Profile" role in id:customize

βœ… You can mark a message as the answer for your post with Right click -> Apps -> Mark Solution
(if you don't see the option, try refreshing Discord with Ctrl + R)

cinder venture
#

you need to do this
ReactDOM.preload(href: string, options: { as: string })

dusty muralBOT
#
βœ… Success!

This question has been marked as answered! If you have any other questions, feel free to create another post

Jump to answer

[Click here](#1187367843990339664 message)