I have to create a text area which taken multiple links then I split() into array yeah Its working fine, but I want to set that array into my state in
It probably is being appended, it's just not available until the next render.
From the documentation:
setState()does not always immediately update the component. It may batch or defer the update until later. This makes readingthis.stateright after callingsetState()a potential pitfall. Instead, usecomponentDidUpdateor asetStatecallback (setState(updater, callback)), either of which are guaranteed to fire after the update has been applied.