title: face error when trying to render my code with redux part . dispatch a string from a file but not getting it on app.js
body: <p><strong>REDUX RENDERING ERROR</strong>
  face error when trying to render my code with the redux part. Successfully dispatch a string from a file but not getting it on app.js</p>
  <pre><code>import React from 'react';
  import {Route, BrowserRouter} from 'react-router-dom'
  import {connect} from 'react-redux'
  import Home from './components/home'
  import Data from './components/data'
  import Nav from './components/nav'
  
  import './App.css';
  
  
  function App(props) {
    const  data  = this.props.data //error in this line
   
    return (
      &lt;div className=&quot;App&quot;&gt;
        &lt;BrowserRouter&gt;
          &lt;Nav /&gt;
          &lt;Route path='/' exact component={Home} /&gt;
          &lt;Route path='/data' component={Data} /&gt;
        &lt;/BrowserRouter&gt;
      &lt;/div&gt;
    );
  }
  const mapStateToProps=(state)=&gt;{
    return {
        data : state.data
    }
  }
  
  
  export default connect(mapStateToProps)(App);
  </code></pre>