Can I Pass `createAsync()` a Signal?
I'm building an analytics dashboard with the Plausible API.
Their API let's you set the time period for the data you're requesting by appending a period value to your URL string like
I want to dynamically change this period value when clicking buttons (e.g., "12mo", "month", "7day", etc). So my server function looks like this:
Here's my question.
I'm using
I've pasted my design pattern below. Is it a good pattern? I asking because I periodically get a page flicker or refresh when I click the buttons and I can't figure out why.
Thank you!
Their API let's you set the time period for the data you're requesting by appending a period value to your URL string like
&period=6m0. I want to dynamically change this period value when clicking buttons (e.g., "12mo", "month", "7day", etc). So my server function looks like this:
Here's my question.
I'm using
cache, createAsync() , and the load() function to render the initial data for the page. I'm setting a hard coded value for the first load. But after that I want to let users change the time period by clicking buttons. I've pasted my design pattern below. Is it a good pattern? I asking because I periodically get a page flicker or refresh when I click the buttons and I can't figure out why.
Thank you!
