npm i styled-reset (use the
-S flag if you're on npm 4 or earlier).
import * as React from 'react'import createGlobalStyle from 'styled-components'import reset from 'styled-reset'const GlobalStyle = createGlobalStyle`/* other styles */`const App =<React.Fragment><GlobalStyle /><div>Hi an app!</div></React.Fragment>}
If you're using Styled Components version 3.x or 2.x, you'll need to use the
injectGlobal api instead:
reset is also available as a named export:
All credit goes to Eric Meyer for reset.css.
reset.css is public domain (unlicensed).
- @empjStang for suggesting a named export and TypeScript support
- @alexandernanberg for using the reset-css package under the hood
- @saadq for fixing included files so TypeScript works.