In example code about external stylesheet https://github.com/zeit/next.js/tree/master/examples/with-global-stylesheet , it still has dangerouslySetInnerHTML. According to this styled-jsx improvement` vercel/styled-jsx#148, we can reference imported stylesheet now.
I tried to change code and it works.
export default () =>
<div>
- <style dangerouslySetInnerHTML={{ __html: stylesheet }} />
+ <style jsx global>{stylesheet}</style>
<p>ciao</p>
</div>
The dangerouslySetInnerHTML does not look right and might trigger eslint error. If my understanding is right, I'll submit a PR for this.
In example code about external stylesheet https://github.com/zeit/next.js/tree/master/examples/with-global-stylesheet , it still has
dangerouslySetInnerHTML. According to thisstyled-jsximprovement` vercel/styled-jsx#148, we can reference imported stylesheet now.I tried to change code and it works.
The
dangerouslySetInnerHTMLdoes not look right and might trigger eslint error. If my understanding is right, I'll submit a PR for this.