v11.0.1
Breaking Changes (from 10.x)
- isLoading renamed to loading across all hooks and render props
- availableLocales removed from useLocale
New
- useGraphAPI hook for typed Graph API calls with loading/error/data states
- useDialog hook for opening Facebook dialogs programmatically
- ReactPixel standalone API (works without a provider)
- FacebookErrorBoundary component for handling SDK errors (ad blockers, network failures)
- logout added to useLogin hook
- useFeed and useSend hooks exported from main entry point
Fixed
- SSR safety: all window/document access guarded, no more window is not defined in Next.js
- Next.js App Router: 'use client' directives on all components and hooks
- XFBML parse: social plugins (Like, Share, Comments, Embedded Posts/Videos) now render correctly
- Facebook SDK script loading: 10s timeout, onerror handler, retry support
- Pixel script load errors now properly reject instead of silently resolving
- useProfile race conditions on unmount
- Context re-renders reduced with memoization
DX
- Explicit TypeScript return types on all hooks
- All public types exported from main entry point
- JSDoc with @example blocks on all hooks
- Error messages prefixed with [react-facebook]
Docs
- New documentation site at seeden.github.io/react-facebook
- Migration guides for Facebook Login and Pixel setup
Full Changelog: 9.0.12...v11.0.1