You can save 2 copies of input in a state, with 1 copy being the previous state of the input, and the other being the state of the current input. Example:
Actual input: asd this.state={copy_one: "as", copy_two: "asd"} Actual input: asdgoogle.com this.state={copy_one: "asd", copy_two: "asdgoogle.com"}
You can update them by doing
this.setState({copy_one: this.state.copy_two, copy_two: currentValue})
on each trigger supports onChange. If you are specifically looking for changes, a quick and dirty hack, in order to get only the difference, will delete the original line with a replacement
difference = this.state.copy_two.replace(this.state.copy_one, "")
then you can use the regex to see if there is a link and style it accordingly.
source share