react-string-replace - A simple way to safely do string replacement with React components

  •        7

See the example/ directory for a runnable example.I wanted an easy way to do string replacement a la String.prototype.replace within React components without breaking React's built in string escaping functionality. This meant standard string replacement combined with dangerouslySetInnerHTML was out of the question.

https://github.com/iansinnott/react-string-replace

Dependencies:

lodash : ^4.17.4

Tags
Implementation
License
Platform

   




Related Projects

babel-plugin-react-intl - Extracts string messages from React components that use React Intl.

  •    Javascript

Extracts string messages for translation from modules that use React Intl.Note: This Babel plugin works with React Intl v2.x, and 1.x of this plugin works with Babel 5, 2.x works with Babel 6.

mdxc - Use React Components within Markdown.

  •    Javascript

MDXC is a tool to convert Markdown into React Components. It lets you import and use other React Components within your Markdown. Try it yourself with the MDXC Playground. MDX is a simpler way to write content for your React applications. While standard Markdown compiles to a string of HTML, MDX compiles directly to JavaScript. If you're writing a React app, MDX is both easier to use and more flexible than standard Markdown.

react-native-star-rating - A React Native component for generating and displaying interactive star ratings

  •    Javascript

A React Native component for generating and displaying interactive star ratings. Compatible with both iOS and Android. For the emptyStar, fullStar, halfStar, and iconSet props, please refer to the react-native-vector-icons package for the valid string names for the star icons. When selecting the icon string names, you must remember to remove the font family name before the first hyphen. For example, if you want to use the ion-ios-star from the Ionicon font set, you would set the fullStar prop to ios-star and the iconSet to Ionicons.

react-values - A set of tiny React components for handling state with render props.

  •    Javascript

A set of tiny, composable React components for handling state with render props. It does this using a small render-prop-based API that exposes helpful transforms like toggle, increment, filter, etc. depending on the type of value, all based on JavaScripts native value types...

component-playground - A component for rendering React components with editable source and live preview

  •    Javascript

codeText takes a string of JSX markup as its value. While you can just pass it a string, I find it is easier to make a separate file and use Webpack's raw loader to load in the raw source. In the example above I use the .example extension, and an examples folder to organize my samples.


css-to-react-native - Convert CSS text to a React Native stylesheet object

  •    Javascript

Converts CSS text to a React Native stylesheet object. Converts all number-like values to numbers, and string-like to strings.

hyperx - 🏷 - tagged template string virtual dom builder

  •    Javascript

This module is similar to JSX, but provided as a standards-compliant ES6 tagged template string function. hyperx works with virtual-dom, react, hyperscript, or any DOM builder with a hyperscript-style API: h(tagName, attrs, children).

gulp-replace - A string replace plugin for gulp

  •    Javascript

gulp-replace can be called with a string or regex. The string to search for.

react-engine - a composite render engine for universal (isomorphic) express apps to render both plain react views and react-router views

  •    Javascript

Pass in a JavaScript object as options to the react-engine's server engine create method. The options object should contain the mandatory routes property with the route definition.routesFilePath: <String> - path for the file that contains the react router routes. react-engine uses this behind the scenes to reload the routes file in cases where express's app property view cache is false, this way you don't need to restart the server every time a change is made in the view files or routes file.

svg-react-loader - Webpack SVG to React Component Loader

  •    Javascript

A webpack loader allowing for inline usage of a SVG as a React component, or for composing individual SVGs into larger ones. The latest version has been refactored to allow for receiving an SVG/XML string or an JSON object-tree representing an SVG. This allows for other loaders before svg-react to alter/update/remove nodes before reaching svg-react.

rapscallion - Asynchronous React VirtualDOM renderer for SSR.

  •    Javascript

This function returns a Renderer, an interface for rendering your VirtualDOM element. Methods are enumerated below.This function evaluates the React VirtualDOM Element originally provided to the renderer, and returns a Promise that resolves to the component's evaluated HTML string.

CalendarPicker - CalendarPicker Component for React Native

  •    Javascript

Note: react-native-calendar-picker v5 is a complete re-write of the calendar. This calendar is now written using ES6 syntax. I kept most of the same functionalities and added support for date ranges. CalendarPicker requires Moment JS. Date props may be anything parseable by Moment: Javascript Date, Moment date, or ISO8601 datetime string.

react-highlight - React component for syntax highlighting

  •    Javascript

The styles will most likely be in node_modules/highlight.js/styles folder. Code snippet that requires syntax highlighting should be passed as children to Highlight component in string format. Language name of code snippet should be specified as className.

omniscient - A library providing an abstraction for React components that allows for fast top-down rendering embracing immutable data for js

  •    Javascript

We can happily announce that as of React 16.6, Omniscient.js can enjoy retirement after a job well done. The new React.memo API can for most cases replace the Omniscient decorator with your own areEqual function. It's not exactly the same, but we feel that it is close enough for most cases. Thanks for supporting Omniscient all these years. Do fast top-down rendering embracing immutable data and functional programming.

enzyme - JavaScript Testing utilities for React

  •    Javascript

Enzyme is a JavaScript Testing utility for React that makes it easier to assert, manipulate, and traverse your React Components' output.Enzyme's API is meant to be intuitive and flexible by mimicking jQuery's API for DOM manipulation and traversal.

query-string - Parse and stringify URL query strings

  •    Javascript

🔥 Want to strengthen your core JavaScript skills and master ES6? I would personally recommend this awesome ES6 course by Wes Bos. You might also like his React course.Parse a query string into an object. Leading ? or # are ignored, so you can pass location.search or location.hash directly.

react-mt-svg-lines - A React.js wrapper component to animate the line stroke in SVGs

  •    Javascript

The component wraps your SVG and animates the stroke-dashoffset property on every path element within. To accomplish this, it injects a style tag with a generated string of CSS. For a description of the technique, see this article. Require MtSvgLines into your component (you can import it under any name)...

formsy-react-components - A set of React JS components for use in a formsy-react form

  •    Javascript

formsy-react-components is a selection of React components that render form elements for use in a formsy-react form. The components render markup to be quickly included in a Bootstrap 3 form. This includes a <label>, help text, and some validation styling tied to formsy’s validation state and validation messages.

stringr - A fresh approach to string manipulation in R

  •    R

Strings are not glamorous, high-profile components of R, but they do play a big role in many data cleaning and preparation tasks. The stringr package provide a cohesive set of functions designed to make working with strings as easy as possible. If you’re not familiar with strings, the best place to start is the chapter on strings in R for Data Science. stringr is built on top of stringi, which uses the ICU C library to provide fast, correct implementations of common string manipulations. stringr focusses on the most important and commonly used string manipulation functions whereas stringi provides a comprehensive set covering almost anything you can imagine. If you find that stringr is missing a function that you need, try looking in stringi. Both packages share similar conventions, so once you’ve mastered stringr, you should find stringi similarly easy to use.