JSFiddle - React, Tailwind, and code Playground

HTML

<input id="text" type="text" val="hallo!"/>
<p id="textout"></p>

JavaScript

var input = document.getElementById("text");
var output = document.getElementById("textout");
input.addEventListener("keyup", function(){
   window.localStorage.setItem("AddedUser", input.value);
});

window.addEventListener("storage", function(event){
    console.log("STORAGE");
    output.innerHTML = window.localStorage.getItem("AddedUser");
    
}, true);