v1.2.0
What's Changed
New Features
- Added optional
countparameter to limit the number of replacements (#91)
// Replace only the first match
reactStringReplace('hey hey hey', 'hey', (match) => <span>{match}</span>, 1);
// => ['', <span>hey</span>, ' ', 'hey', ' ', 'hey', '']Bug Fixes
- Fixed crash when using RegExp patterns with the
countparameter
Full Changelog: v1.1.2...v1.2.0