Tagged Template Literals — How Tools Like Styled Components Work
Published in
6 min readNov 10, 2022
Have you ever wondered how syntactical sugar like styled
just magically works? Let’s recreate this functionality using tagged template strings in Javascript.
If you used tools like styled-components or graphql, you most likely came across tagged template literals. A new Javascript feature that was introduced with ES6.