JSFiddle - React, Tailwind, and code Playground

by Julien Etienne

JavaScript

// Helpers 
        const createMarkupPartial = () => {
            const template = document.createElement('template');
            return string => {
                (template.insertAdjacentHTML('afterbegin', string));
                return template;
            }
        }
        const createMarkup = createMarkupPartial();
        
        const wavelet = string => createMarkup(string);






        /*
          A wavelet is a tag function used for making small or simple snippets of markup code that
          do not require layout or component functionality e.g. a list-item, or a non-interactive part of the UI.
        */
        const biffQuote = (color) => wavelet`<h1 class="${color}">Think, McFly! Think!</h1>`;

console.log(biffQuote('red'))