Skip to content
Snippets Groups Projects
Commit 1b84d0fb authored by Maxime Jacquemin's avatar Maxime Jacquemin Committed by Maxime Jacquemin
Browse files

[ivette] Several fixes

- The `useSelection` hooks did not memoized the returned `setSelection`
  function, leading to performance issues if a hook depended on it.

- The standard behavior for `usePromise` is to take a building function
  and dependencies, automatically memoized the constructed promise, and
  then doing as before. However, we keep a `usePromiseNoMemo` with the
  previous behavior. It seems needed for the `theme` handling.

- `useCache` new hook allows to add a cache to a given function. It also
  takes an optional serialization function for complex types for which
  standard equality does not provide the expected behavior.
parent 5f2c6923
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment