I'm new to blazor and still learning
I have two components in my page, the first one is used to take same user inputs and the second component is used to fetch data from an API based on user input on the first component
I'm calling OnInitializedAsync to fetch data from API, but since this method is not called after re-rendering the component i'm using OnParametersSetAsync
my question is what's the difference between fetching data using OnInitializedAsync VS OnParametersSetAsync , which one should i use ?
use
OnParametersSetAsync()
OnParametersSetAsync
are called each time new or updated parameters are received from the parent in the render tree
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With