title: Blazor Interop LocalStorage 0.4.0 change to 0.5.1
body: <p>I am learning how to use Blazor Interop, but it has changed recently, so I don't have any easy example to learn from I copied a code from a working example and would like to change it to the new interop here is the code from Blazor 0.4.0 from .js file</p>
  
  <pre><code>Blazor.registerFunction('saveToken', token =&gt; {
  window.localStorage.setItem('jwt', token);
  console.log("Authentication token has been stored.");
  return true;
  </code></pre>
  
  <p>});</p>
  
  <p>And this from the Blazor page .csthml functions</p>
  
  <pre><code>            RegisteredFunction.Invoke&lt;bool&gt;("saveToken", token);
  </code></pre>
  
  <p>I have already read the Blazor Doc Interop   <a href="https://blazor.net/docs/javascript-interop.html" rel="nofollow noreferrer">https://blazor.net/docs/javascript-interop.html</a>     and the example was very easy to follow, but with localstorage I don't know how</p>