Check out example codes for "input html tag in code igniter". It will help you in understanding the concepts better.

Code Example 1

$js = ['onClick' => 'some_function();'];
echo form_input('username', 'johndoe', $js);

Code Example 2

$js = ['onClick' => 'some_function();']; echo form_input('username', 'johndoe', $js);

Learn ReactJs, React Native from akashmittal.com