ably-js icon indicating copy to clipboard operation
ably-js copied to clipboard

[React Hooks] wrong error when hooks are called outside `<AblyProvider>`

Open ttypic opened this issue 1 year ago • 0 comments

When any hook is called outside <AblyProvider>'s context:

Expected:

Could not find ably client in context. Make sure your ably hooks are called inside an <AblyProvider>

Actual:

TypeError: Cannot read properties of undefined (reading 'client')

┆Issue is synchronized with this Jira Task by Unito

ttypic avatar Aug 21 '24 14:08 ttypic