Skip to content Skip to sidebar Skip to footer
Showing posts with the label Template Literals

Defining A Function Inside A Template Literal

I'm using styled-components as a solution to styling for React. They've got a nice approach… Read more Defining A Function Inside A Template Literal

Is There A Downside To Using Es6 Template Literals Syntax Without A Templated Expression?

Is there a reason (performance or other) not to use backtick template literal syntax for all string… Read more Is There A Downside To Using Es6 Template Literals Syntax Without A Templated Expression?

Javascript Es6 Tagged Templates - When Is Raw Used? When Is Cooked Used?

After studying this Es6 tag template example: var yo = func`${x} + ${y}\n= ${x + y}`; one@public-… Read more Javascript Es6 Tagged Templates - When Is Raw Used? When Is Cooked Used?

How Can I Call A Template Literal Tag Function On A Regular String?

If I have a template literal tag function foo, which let's me do: const fooTaggedText = foo`som… Read more How Can I Call A Template Literal Tag Function On A Regular String?