title: Blazor - Porting a Admin Template
body: <p>I have a <code>HTML Admin template</code> that I'm need to port <code>Blazor</code>.</p>
  <p>All <code>CSS</code> are working fine, the only problem I have right now is that the Admin template uses <code>jQuery</code> to do a lot of CSS manipulation and pretty style things.</p>
  <p>At first I didn't want to use jQuery because when you think using Blazor is like trying to get away from Javascript, but because in this Admin template there are some nice left menu animations and control of hover CSS styles and many other things I guess the easies way would be to add <code>jQuery</code>.</p>
  <p>The template uses an <code>app.js</code> file where it starts with:</p>
  <pre><code>  $(window).on('load', function () {
    .....
    }
  </code></pre>
  <p>Insde the load event many things are setup.</p>
  <p>I read that in order to user <code>jQuery</code> with Blazor you need to let Blazor control the DOM, so I wont have in my jquery app.js file a <code>onReady</code> or <code>Load</code> event. I will need to call from Blazor an Initializer method that will act as the Load event.</p>
  <p>My questions are:</p>
  <ol>
  <li><p>What is the life cycle method that I have to use in Blazor to run this? Because Blazor is an <strong>SPA</strong> this initial setup of components will be called just once or when the page is refreshed, should I use <code>OnInitialized</code> or <code>OnAfterRenderAsync(bool firstRender)</code>.</p>
  </li>
  <li><p>The Blazor life cycle method that will run this initial setup has to run on the main routing path <code>@page &quot;/&quot;</code>?</p>
  </li>
  <li><p>Using jQuery in Blazor is against its conceptual design or there is no problem or bad pattern to use it? Im not going to use any ajax stuff, etc is just basically DOM manipulation that is pretty easy to do with jQuery.</p>
  </li>
  </ol>