* feat: useTrackedQuery
add useTrackedQuery hook, which tracks notifyOnChangeProps automatically via a Proxy
* feat: notifyOnChangeTracked
different approach to tracking used props by using an option rather than a new hook, so that we can also easily combine this with useInfiniteQuery; also, using Object.defineProperty rather than a Proxy
* feat: notifyOnChangeTracked
add some documentation for notifyOnChangeTracked
* feat: notifyOnChangeTracked
add a test for notifyOnChangeTracked
* feat: notifyOnChangeTracked
keep trackedProps separate from notifyOnChangeProps and only merge them in shouldNotifyListeners
* feat: notifyOnChangeTracked
store tracked result object on queryObserver instance so that the reference stays the same between renders
* feat: notifyOnChangeTracked
create a new trackedResult whenever we create a new result
this ensures that we keep referential identity of the tracked result object if nothing changes, but still get a new instance if we need to (to avoid stale closure problems)
* feat: notifyOnChangeTracked
add test for referential stability between re-renders; even if we are tracking changes, we should return the same object if we re-render (for some other reason than react-query changes) and nothing has changed
* feat: notifyOnChangeTracked
rename trackedResult to trackedCurrentResult
* feat: notifyOnChangeTracked
combine notifyOnChangeTracked with notifyOnChangeProps
* feat: notifyOnChangeTracked
remove auto-resetting of tracked props, which means that every prop ever tracked will lead to a re-render; this is the "safe" side - we'd rather have an unnecessary re-render rather than a bug because we are not re-rendering when something is observed only in an effect
* feat: notifyOnChangeTracked
always re-render if we are tracking props, but not using any. In that case, trackedProps will be an empty array, which would lead to no re-renders at all (same as setting notifyOnChangeProps to empty Array)
* feat: notifyOnChangeTracked
conditionally create trackedResult - we don't need it if we are not actually tracking props
* feat: notifyOnChangeTracked
add a test for combining notifyOnChangeProps: 'tracked' and notifyOnChangePropsExclusion
* feat: notifyOnChangeTracked
update docs
Adding type attribute tells browser what type of button it is. For most browsers the default type of button is submit. This causes a full page post back in older legacy server rendered frameworks like asp.net webfo