Skip to content

4.0.0

Compare
Choose a tag to compare
@joshswan joshswan released this 13 Apr 00:35
· 10 commits to master since this release
4100d2a

4.0.0 (2021-04-13)

Big update and huge thanks to @lafiosca for the awesome PR with custom matcher support. There are a few breaking changes that were in the works already for v4 (see below), but migration should be fairly simple. And once you're updated, the new matchers prop with custom regexes, onPress handers, styling and more is a game-changer!

⚠ BREAKING CHANGES

  • Link types are all disabled by default - pass email, hashtag, etc. props to
    enable.
  • Truncation is also disabled by default - use truncate={32} to enable previous behavior
  • Prop latlng removed - import LatLngMatcher and supply to matchers prop instead
  • The webFallback prop has been removed and service links for hashtags/mentions
    default to web URLs. Use the useNativeSchemes to link directly to apps instead or use
    onPress/onLongPress/matchers to customize behavior.

Features

  • user-specified custom link pattern handling (#54) (3f91a09)
  • add LatLng and international phone custom matchers (d229141), closes #25
  • default to web URLs for hashtag/mention links and remove webFallback prop (b8b4fa8)

Code Refactoring

  • convert Autolink to functional component with hooks and export utils (c94ac87), closes #49