react stop printing warning warnings in console code example Example: how to remove warnings in react js console how to remove last word in string