Hello I’m making a comment section for my website which works but when I push an object to an array my {#each}
block doesn’t update here is this block of code
{#each commentsScript as { userName, rating, comment }, i}
<div class="flex">
<div class="w-1/4">
<h5>{userName}</h5>
<h5>{rating}</h5>
</div>
<div class="w-3/4">
<p>{comment}</p>
</div>
</div>
{/each}
In my script section, I push a new comment to an array and it does show up after I refresh the page but I want to rerender it as soon as the user leaves a comment so the user would see hes/her own comment so is there any way I can rerender it?