Skip to content

v2.0.0

Compare
Choose a tag to compare
@kmoskwiak kmoskwiak released this 02 Jun 19:16
· 11 commits to master since this release

Initial state is no longer passed to hook. It will be always set to null.

// before
const [data, error] = useSSE(
  { data: 'initial data' }
  () => {
    return fetch();
  },
  []
);
// after
const [data, error] = useSSE(() => {
  return fetch();
}, []);