Automatic linking of URLs, phone numbers, emails, handles, and even custom patterns in text for React Native
Bug Fixes:
truncateLocation
prop is no longer passed along with "other" props to underlying Text
component (fixes issue with react-native-web) - @ericboyanganNew Stuff:
Autolink
component now extends React.PureComponent
instead of React.Component
to optimize re-rendersNew Stuff:
"facebook"
option for hashtag
prop to link hashtags to Facebook"soundcloud"
option for mention
prop to link usernames to SoundCloud (web-only)stripTrailingSlash
option to control whether or not to remove trailing slashes from linked URL text (default: true
)Changes:
linkStyle
prop is providedBug Fixes:
phone
prop now correctly allows for a string or a boolean - @JosephSmith127New Stuff:
truncateLocation
support added! Use the "smart"
, "end"
, and "middle"
options to control where in the string the truncation will occur.New Stuff:
latlng
propAutolinker.js
Bug Fixes:
Proptypes.oneOfType
definition for url
prop now correctly uses an array - @TikiTDONew Stuff:
allowFontScaling
, are now passed to link Text components automatically since they don't inherit from the root Text node - @orinocoNew Stuff:
url
prop has been updated to allow schemeMatches
, wwwMatches
and tldMatches
options. Simply pass an object to enable/disable each of these options. For example: <Autolink text="github.com" url={{ tldMatches: false }} />
will not produce any links since tldMatches
is disabled. - @trybeee