I am trying to run a function to do further string manipulation on the result of the FormattedMessage. I cannot find a way even after running it through a function as below :
<Button text={ this.testMethod(buttonText) } />
testMethod(result){
return result;
}
In summary: I am trying to get the actual text and not the object and then do some string manipulation.
Don't want this: {id: "test", defaultMessage: "Hello there"}
Need: To access "Hello there" and for example extract the word "there"