Next.js Discord

Discord Forum

React native web with Next

Unanswered
Australian Freshwater Crocodile posted this in #help-forum
Open in Discord
Australian Freshwater CrocodileOP
React native web with Next 14 causing flicker.
solution for Pages router : https://github.com/vercel/next.js/blob/v14.2.4/examples/with-react-native-web/pages/_document.js

injecting styles on. server :
const styles = [
      <style dangerouslySetInnerHTML={{ __html: normalizeNextElements }} />,
      getStyleElement(),
    ];
    return { ...page, styles: Children.toArray(styles) };


how do I get above working in app router as I am unaware of overriding head in App router like mentioned in solution above.

sample Issue:
https://github.com/soniankur948/RN-flicker

0 Replies