A simple way to safely do string replacement with React components
Changed
undefined
in the results of string.split would throw an error. This depends on the user-passed regex so it only happens sometimes, depending on your regex. can reproduce using two matching groups.Since the API has long been stable this release simply signifies that fact.
Remove dependencies.
Changes:
NOTE: The replacer function will now be called with 3 arguments instead of 2 (for details, see the diff).
The release allows reactStringReplace
to be called with an Array as the first argument. This is good because it means you can call reactStringReplace
multiple times on a result, allowing multiple replacements on a single string.
See the README for full details.