You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Something has changed in Next.js 15 so it's now necessary to load components using ably-js with next/dynamic and use 'use client'; directive for such components, otherwise we would get Warning: Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons: errors and possible build issues like in #1788.
Something has changed in Next.js 15 so it's now necessary to load components using ably-js with
next/dynamic
and use'use client';
directive for such components, otherwise we would getWarning: Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
errors and possible build issues like in #1788.See working Next.js 15 (RC) example app: https://github.com/VeskeR/ably-js-nextjs-15-example (need to run
npm install --legacy-peer-deps
due to this npm issue and using prerelease version of next.js).And see Next.js 14 app: https://github.com/ably-labs/ably-nextjs-fundamentals-kit. You can remove
'use client';
there and skip loading components usingnext/dynamic
and it would still work.Need to investigate what's changed and update README for using ably-js with Next.js 15.
┆Issue is synchronized with this Jira Task by Unito
The text was updated successfully, but these errors were encountered: