How to fix Warning: String "ref" is deprecated and will be removed in React | DevErrors