String replace with jsx children
npm install @nobuti/retemplateA template utility to replace strings with jsx elements.
Given a string, replace every {key} with the data[key] passed. This can be a function returning a
string or a raw string. The result will be an array of strings mixed with jsx elements. The primary
use case is similar to using String.prototype.replace except for React.
``
import template from '@nobuti/retemplate'
render() {
return (
``