Repository navigation
Version Packages - #588
Merged
Merged
Version Packages#588
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to master, this PR will be updated.
Releases
react-share@6.0.0
Major Changes
a811bc3: Change the default
EmailShareButtonseparatorfrom" "to"\n"so the shared URL appears on its own line below the email body. The newbuildEmailShareUrlhelper uses the same default.Reported in Why two empty lines on top of email sharing? #582, where the URL was run together with the body text. Pass
separator=" "to keep the previous formatting.5bb43a5: Open the share popup synchronously when
beforeOnClickreturns a promise, then load the share URL into it once the promise resolves. If the promise rejects, sharing is cancelled and the popup is closed.Previously the popup was opened only after awaiting
beforeOnClick. By then the click's user activation had expired, so Safari and other browsers with strict popup blockers silently blocked the share window (Any method is there which can return popup is blocked? #525, EmailShareButton not working on safari web browser #506, Not Working on Mobile browser #529). Rejections frombeforeOnClickalso used to surface as unhandled promise rejections.e72b45e: Remove all deprecated share count exports in v6, including the underlying share count implementation and the
jsonpdependency that previously powered them.2dc35f2: Remove the deprecated
TwitterShareButtonandTwitterIconaliases in v6. UseXShareButtonandXIconinstead.05c4997: Remove
PocketShareButton,PocketIcon,PocketLegacyIcon, andbuildPocketShareUrl, as well asWorkplaceShareButton,WorkplaceIcon,WorkplaceLegacyIcon, andbuildWorkplaceShareUrl.Pocket shut down in July 2025 and Workplace from Meta shut down in June 2026, so these buttons could only open dead share pages.
20570c5: Drop React 17 support in v6 and require React 18 or 19 via
peerDependencies.08b5638: Remove
title,summary, andsourcefromLinkedinShareButtonand makebuildLinkedinShareUrlURL-only.This follows the long-running LinkedIn compatibility problems in Linkedin sharing title/text seems deprecated #550 and LinkedInShareButton broken due to new API #362. LinkedIn no longer provides a reliable public URL-based way to prefill those fields, so v6 stops exposing them as if they were dependable.
22249a6: Split the icon exports into raw and legacy families for v6.
The existing
*Iconexports now render SVG logos that are closer to the underlying network marks. The previous badge-style icons remain available as*LegacyIconexports with the existinground,borderRadius,bgStyle, andiconFillColorprops.If you want to preserve the v5 visuals, rename imports such as
FacebookIcontoFacebookLegacyIcon,XIcontoXLegacyIcon, andWhatsappIcontoWhatsappLegacyIcon.If you keep the
*Iconnames, note that raw icons default tosize={24}instead of64, and no longer acceptround,borderRadius,bgStyle, oriconFillColor.b2c18ff: Remove the deprecated
hashtags,related, andviaprops fromThreadsShareButtonin v6. Those props were ignored in v5 and were kept only for compatibility ahead of this major release.28da248: Replace the share button
titleprop with explicit v6 payload names:textfor Bluesky, Gab, Line, Telegram, Threads, and Xmessagefor WhatsApp and VibershareTitlefor Hatena, Instapaper, LiveJournal, Mail.ru, OK, Reddit, VK, and WeibopostTitlefor TumblrhtmlTitleremains the native button tooltip/title attribute.Minor Changes
7996b59: Add an
onShareWindowOpencallback to popup-based share buttons. It receives the opened share window, ornullwhen a popup blocker prevented it from opening, so apps can detect blocked popups and offer a fallback, as requested in Any method is there which can return popup is blocked? #525.98bb140: Mark the published ESM and CJS bundles with a
"use client"directive so share buttons can be imported directly from React Server Components, such as Next.js App Router pages, without a local client wrapper. Requested in Cannot be use with React Server Component #491.2ff01f4: Draw the raw
LivejournalIconpencil in navy and white like the official LiveJournal logo. The pencil used to be cut out of the blue circle, so it took on the page background instead of its own colors.7f896ad: Update the raw
OKIconto the 2023 OK logo: a white figure on an orange (#FF7700) rounded square, as served on ok.ru. The previous bare glyph was the old mark in an older orange.82f732f: Update the raw
ThreadsIconto the 2026 Threads app icon: a white glyph on a black rounded square. The previous bare glyph was the old mark and looked lighter than the other raw icons.17a51d2: Use the Lucide mail and share glyphs for the raw
EmailIconandNativeShareIcon. The previous glyphs were small badge glyphs on a 64x64 viewBox and looked undersized next to the other raw icons.57ddea2: Put glyph-only raw icons on circle badges so every raw icon has a similar visual weight, like the v5 badges had.
XIcon,WeiboIcon,BlueskyIcon,EmailIcon,NativeShareIcon,InstapaperIcon, andTumblrIconnow sit on a circle. The glyph is always drawn in white, so it stays legible on dark backgrounds.NativeShareIconnow uses a fixed blue (#0A84FF) instead of the current text color, which would hide the white glyph on dark pages.e05b396: Add an explicit
mobileBehaviorprop toFacebookMessengerShareButton,TelegramShareButton,ViberShareButton, andWhatsappShareButton.This follows recurring mobile browser and app-handoff reports in Facebook Share redirects to browser #577, Blank page on iOS PWAs #551, Not Working on Mobile browser #529, and [Messenger] Add mobile props to choose between web link or app link #357. The new prop keeps web sharing as the default while allowing best-effort app-link behavior with
mobileBehavior="app"ormobileBehavior="auto".f978a65: Add low-level helper exports for advanced usage in v6, including per-network
build*ShareUrlhelpers andopenShareWindow(url, options).9e44ba2: Add
canNativeShare(data),shareNative(data),NativeShareButton, and a genericNativeShareIconfor browser-native sharing flows.This gives mobile and PWA use cases a first-class Web Share API path instead of forcing them through network-specific popup URLs, which is especially relevant for requests like Issue Sharing PDF Using react-share from Table-Based Component in React JS #576 and the iOS/PWA limitations described in Blank page on iOS PWAs #551.
f708c54: Keep raw icon details white on dark backgrounds. Details cut out of the brand shape, such as the Facebook "f", the LinkedIn "in", the LINE lettering, and the inside of the WhatsApp and Viber bubbles, used to show the page background through them, so the logos turned into dark blobs on dark pages.
colorstill recolors the brand-colored part of the icon.Patch Changes
e72d4f3: Update five raw icons to their networks' current brand colors:
BlueskyIcon(#0560FF),LineIcon(#06C755),PinterestIcon(#E60023),TumblrIcon(#001935), andGabIcon(#30CE7D). They used older or approximate colors before. The legacy icons keep their v5 colors.4aa9052: Use the current share endpoints for X (
https://x.com/intent/post), Threads (https://www.threads.com/intent/post), and Telegram (https://t.me/share/url).The old
twitter.com,threads.net, andtelegram.mehosts only keep working through redirects, which add an extra hop and can drop the share intent if those redirects are retired. Requested in TwitterShareButton should open x.com instead of twitter.com #536.71e21b3: Draw the raw
LinkedinIconandGabIconat full size. They reused the small glyphs from the badge icons without their backgrounds, so they filled less than half of the icon box and looked tiny next to the other raw icons.LinkedinIconnow uses the full rounded-square "in" mark in LinkedIn's current#0A66C2blue, andGabIconputs the wordmark on a rounded green square.