I'm trying to store the return of a react component in a variable so I can later use it to implement a search of the variable content: For example:
const myComponent = (props) => (
<div><span>my name is {props.name}</span></div>
)
then I would like to do the following:
const resultForSearch = <myComponent name="bob"/>
console.log(resultForSearch ) // would be : my name is bob