Example #1
0
 static async getInitialProps ({ renderPage }) {
   AppRegistry.registerComponent('Main', () => Main)
   const { getStyleElement } = AppRegistry.getApplication('Main')
   const page = renderPage()
   const styles = [
     <style
       key={index++}
       dangerouslySetInnerHTML={{ __html: normalizeNextElements }}
     />,
     getStyleElement()
   ]
   return { ...page, styles }
 }
Example #2
0
 static async getInitialProps({ renderPage }) {
   AppRegistry.registerComponent('Main', () => Main);
   const { getStyleElement } = AppRegistry.getApplication('Main');
   const page = renderPage();
   const styles = [
     <style
       key={index++}
       // eslint-disable-next-line react/no-danger
       dangerouslySetInnerHTML={{ __html: normalizeNextElements }}
     />,
     getStyleElement(),
   ];
   return { ...page, styles };
 }