codeforpdx / PASS

PASS project - with HMIS module integration
MIT License
26 stars 25 forks source link

improve react query behavior #459

Closed timbot1789 closed 9 months ago

timbot1789 commented 9 months ago

A small improvement to react query behavior. React query automatically refetches any data marked as "stale" when it's requested. By default staleTime is set to zero, everything is automatically stale and always refetched. This change sets staleTime to one minute. Documents won't be refetched until they're a minute old. This should reduce some redundant fetches.

xscottxbrownx commented 9 months ago

sounds good to me.

not sure if leaving a space between the jsdoc typedef and the additions is needed or not - so as to not link the jsdoc with the additions to codebase?

leekahung commented 9 months ago

sounds good to me.

not sure if leaving a space between the jsdoc typedef and the additions is needed or not - so as to not link the jsdoc with the additions to codebase?

If they're imported typedefs, they don't to be directly above the lines of code it's being used for like what we do for components which JSDoc needs to be directly above them to be associated.

timbot1789 commented 9 months ago

Fixed JSDoc typedefs. @leekahung can you add a work item for yourself to add jsdoc validation into the project as part of the linter? Checking this stuff manually is pretty inefficient.

leekahung commented 9 months ago

Fixed JSDoc typedefs. @leekahung can you add a work item for yourself to add jsdoc validation into the project as part of the linter? Checking this stuff manually is pretty inefficient.

The plugin for the linter for JSDoc is already in the project. I'll see if I could get the specific validation call turned on for it for imports like this.