title: creating classes without declaration
body: <p>It is possible to creating classes without direct definition?(Are eval function useful?)<br />
  I tried to do this But get errors such as Classes names not defined and nothing was returned from render and other errors</p>
  <pre class="lang-java prettyprint-override"><code>import * as React from 'react';
  import * as RN from 'react-native';
  import {NavigationContainer} from '@react-navigation/native';
  import {createBottomTabNavigator} from '@react-navigation/bottom-tabs';
  
  const BottomTabs = createBottomTabNavigator();
  
  export default function App(){
    let state = {
      screenNames: ['One','Two','Three'],
      screenJSXs: [],
    };
    let SCREENS = [],ClassString = '',Classes = [];
    state.screenNames.map((n)=&gt;{
      state.screenJSXs.push(&lt;RN.View&gt; &lt;RN.Text&gt; Hi {n} &lt;/RN.Text&gt; &lt;/RN.View&gt;);
    });
    state.screenNames.map((n,i)=&gt;{
      Classes.push('class ' + n + ' extends React.Component{render(){return (' + state.screenJSXs[i] + ')}}');
    // Example
    /*
      class One extends React.Component{
        render(){
          return (
            &lt;View&gt; &lt;Text&gt; Hi One &lt;/Text&gt; &lt;/View&gt;
          );
        }
      }
    */
    ClassString = Classes.join('\n');
    eval('ClassString');
    });
    state.screenNames.map((n,i)=&gt;{
      SCREENS.push(&lt;BottomTabs.Screen name={n} component={eval('n')} /&gt;);
    });
  //if n pushed in eval function with '' then project work correctly but with blank pages else return Error : class name was not defined.
    return (
      &lt;NavigationContainer&gt;
        &lt;BottomTabs.Navigator&gt;
          {SCREENS}
        &lt;/BottomTabs.Navigator&gt;
      &lt;/NavigationContainer&gt;
    );
  }
  </code></pre>
  <p>by this problems, how do I do?
  Thank.</p>