React String Replace

JSON →
library 2.0.1 ·javascript
verified May 27, 2026

react-string-replace is a lightweight JavaScript utility designed to safely replace substrings or regular expression matches within a given string or array, converting them into an array containing React components and strings. It is currently at stable version 2.0.1 and has seen active development, with recent tooling modernizations and breaking changes in major versions. The library's core differentiator is its ability to perform replacements suitable for React's rendering model without relying on `dangerouslySetInnerHTML`, thus maintaining React's built-in XSS protection. It offers a simple API for common tasks like highlighting text, converting URLs, or parsing mentions, and supports chaining for multiple replacement patterns. It has zero runtime dependencies and ships with TypeScript types, making it suitable for modern React applications.

total hits 16
actors 7 distinct systems
last hit 5d ago MetaBot
GPTBot
5
MetaBot
4
Script
1
ClaudeBot
1
Search engines
2

top countries 🇺🇸 United States · 🇨🇦 Canada · 🇩🇪 Germany