I am learning react native. My index.js file is like below :
import React from 'react';
import { AppRegistry } from 'react-native';
import { Provider } from 'react-redux';
import App from './App';
import configureStore from './src/store/configureStore';
const store = configureStore();
const RNRedux = () => (
<Provider store={store}>
<App />
</Provider>
);
AppRegistry.registerComponent('redux1', () => RNRedux);
Now, my question is : "React" is not used anywhere. So, why am I importing it here ? If I comment it out then I am getting an error "Cant find variable: React". Does react native need it ? If so, then why react native haven't imported it ? Is there any reason behind it ?
I understand that I am importing "react" in my App.js file as I am using Component.
Thank you.
** I have found my answer. I have forgot that I have used JSX in the index.js file and for that I need to import react.