Closed Jenan closed 7 years ago
Yup, that should work fine, but the function is the default export not a named export. So try:
import reactStringReplace from "react-string-replace";
Check out this example for a working example: https://github.com/iansinnott/react-string-replace/blob/master/example/index.js#L3
Note that this module is NOT written in ES6, but if you are using bundler like Webpack it should still be able to handle it.
Hello,
is it possible use this library with ES6 Imports?
I have tried something like this:
import { reactStringReplace} from "react-string-replace";
But it doesn't work because I get errorreactStringReplace is not a function
How can I fix this? :) Thank you.