JSFiddle - React, Tailwind, and code Playground

by Oski Krawczyk

HTML

<script src="http://mozilla.github.io/localForage/localforage.min.js"></script>
<strong></strong>

CSS

strong {
    color: #c04
}

CoffeeScript

element = document.querySelector "strong"
greetings =
    hello: "Hello"
    world: ["W", "o", "r", "l", "d"]

# Save in storage (if you're on Chrome, it'll be in Resources/IndexedDB)    
localforage.setItem "greetings", greetings

# Read storage and print
localforage.getItem "greetings", (value) ->
    element.innerHTML = "#{value.hello} #{value.world.join("")}"
    
# Uncomment the code below and hit RUN (or CTRL+RETURN) to clear stored keys
# localforage.clear()