ReactDOM.preload() error
Unanswered
European hornet posted this in #help-forum
European hornetOP
for some reason im getting this error
but this is how i am loading it
is this wrong ?
app-index.js:33 Warning: ReactDOM.preload() expected the second argument to be an options argument containing at least an "as" property specifying the Resource type. It found something with type "string" instead. The href for the preload call where this warning originated is "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/all.min.css".but this is how i am loading it
ReactDOM.preload('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/all.min.css', {
as: 'style',
integrity: 'sha512-z3gLpd7yknf1YoNbCzqRKc4qyor8gaKU1qmn+CShxbuBusANI9QpRohGBreCFkKxLhei6S9CQXFEbbKuqLg0DA==',
crossOrigin: 'anonymous',
type: 'text/css',
referrerPolicy: 'no-referrer',
onload: 'this.onload=null;this.rel="stylesheet"'
});is this wrong ?
5 Replies
European hornetOP
seems to be that react-dom is expecting 2 parameters
and react-server-dom is sending 3 which is wrong
and react-server-dom is sending 3 which is wrong
also in the docs says 2 params
https://nextjs.org/docs/app/api-reference/functions/generate-metadata#link-relpreload
https://nextjs.org/docs/app/api-reference/functions/generate-metadata#link-relpreload
European hornetOP
things like this are getting annoying too
app-index.js:33 Warning: ReactDOM.preload() expected the second argument to be an options argument containing at least an "as" property specifying the Resource type. It found something with type "string" instead. The href for the preload call where this warning originated is "/_next/static/css/app/page.css?v=1705756093911".European hornetOP
up
European hornetOP
@DirtyCajunRice | AppDir ^