Check out example codes for "styled components webpack config". It will help you in understanding the concepts better.

Code Example 1

module.exports = {
    presets: ['@expo/next-adapter/babel'],
+    plugins: [['styled-components', { 'ssr': true }]]
};

Code Example 2

yarn add -D babel-plugin-styled-components

Learn ReactJs, React Native from akashmittal.com