Check out example codes for "css permit tabs on textarea react". It will help you in understanding the concepts better.

Code Example 1

<ConfigurationInput onKeyDown={e => {
   if ( e.key === 'Tab' && !e.shiftKey ) {
   document.execCommand('insertText', false, "\t");
   e.preventDefault();
   return false;
}}}/>

Code Example 2

document.querySelector('#textarea').addEventListener('keydown', e => {
	if ( e.key === 'Tab' && !e.shiftKey ) {
		// execCommand operations are "Cmd|Ctrl+Z"-able
      	// note: execCommand is deprecated and may not work in the future
		document.execCommand('insertText', false, "\t");
		e.preventDefault();
		return false;
	}
});

Learn ReactJs, React Native from akashmittal.com