title: How to dynamically import react module which is json data
body: <p>I have module like this</p>
  <pre><code>const RecyclerView = [
  {
      text: 'RecyclerView data',
  },
  {
      text: 'Codes data',
  }
  
  ];
  
  export default RecyclerView
  </code></pre>
  <p>And when I Import and map the data like below I get Result</p>
  <p>recycle RecyclerView data
  ...</p>
  <pre><code>import React from &quot;react&quot;;
  import accordion from &quot;../pages/RecyclerView&quot;;
  import Home from &quot;./Home&quot;
  import TextComponent from &quot;./TextComponent&quot;;
  
  export default function DecisionActivity(props) {
      //let data = Contents;
  
      const {title, hasContent} = props
  
      if(hasContent){
  
          //console.log({title});
          //where title is === RecyclerView
          // and hascontent is bool
         
          accordion.map(item=&gt;{
              console.log(&quot;recycle &quot;, item.text);
          })
  
          return &lt;TextComponent text={title}/&gt;
      
      }
  
       return &lt;Home/&gt; 
        
  }
  
  </code></pre>
  <p>I don't wanna use this line
  <strong>import accordion from &quot;../pages/RecyclerView&quot;;</strong></p>
  <p>as RecyclerView (the file name is dynamic there might be more with different name
  that I would get in component at title prop, then I wanna map the Json data to create my dynamic UI from different components...</p>
  <p>Could anybody help me in this situation a different solution can also help but the name of file (Like RecyclerView) should be dynamic.</p>
  <p><strong>Thanks in advance</strong></p>