//create a webpack.config.js file on the root of the project to use the latest version of styled components with react and add the following snippet: const path = require('path'); module.exports = { resolve: { alias: { 'styled-components': path.resolve( __dirname, 'node_modules', 'styled-components' ), }, }, };
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter