map is not defined React JS

map is not defined React JS

i have a problem maping the component state. i have this export:

i have a problem maping the component state. i have this export:

export default[
  {
    'menu': 'Usuarios',
    'url' : '',
    'items':[
      {
        'title': 'Nuevo usuario',
        'destino' : '/DashBoard'
      },
      {
        'title': 'Actualizar datos',
        'destino' : '/DashBoard'
      }
    ]

}, { 'menu': 'Socios', 'url' : '', 'items':[ { 'title': 'Membrecias', 'destino' : '/DashBoard' } ]

}, { 'menu': 'Clases', 'url' : '', 'items':[ { 'title': 'Nuevo usuario', 'destino' : '/DashBoard' } ]

}, { 'menu': 'Productos', 'url' : '', 'items':[ { 'title': 'Nuevo usuario', 'destino' : '/DashBoard' } ]

}, { 'menu': 'Compras', 'url' : '', 'items':[ { 'title': 'Nuevo usuario', 'destino' : '/DashBoard' } ]

}, { 'menu': 'Ventas', 'url' : '', 'items':[ { 'title': 'Nuevo usuario', 'destino' : '/DashBoard' } ]

}, { 'menu': 'Estadisticas', 'url':'/Dashboard' }, { 'menu': 'Reportes', 'url': '/DashBoard' } ]

The menu routes is not defined so assign '/ DashBoard' to all but it is not a problem.

I have the problem when I try to map the state of the component in the following way:

// Dependencies
import React, {Component} from 'react';
//Data
import mdata from '../../Data/Settings/MenuDash';

class DropTownMenu extends Component{ constructor(){ super(); this.state={ data: mdata, } } render(){

return(
  <div className='DropTownMenu'>
    {this.state.data.map((todo,i) =>
      <div key={i}>
      <span>{todo.menu}</span>
      <span>{todo.url}</span>
      <span>{todo.items.map((todo, i)=><span key={i}>{todo.title}</span>)}</span>
  </div>

  )}

  </div>
);

} } export default DropTownMenu;

use the 'span' tag just to test this I have to implement it as a list, but I'll take care of that. the question is that this does not give me errors in console but if in the browser, those errors are the following: 

my english is not very good apologies for that.

javascript reactjs

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

The essential JavaScript concepts that you should understand

The essential JavaScript concepts that you should understand - For successful developing and to pass a work interview

JavaScript Memory Management System

The main goal of this article is help to readers to understand that how memory management system performs in JavaScript. I will use a shorthand such as GC which means Garbage Collection. When the browsers use Javascript, they need any memory location to store objects, functions, and all other things. Let’s deep in dive that how things going to work in GC.

Mapbox GL Javascript wrapper for ReactJS

react-mapbox-wrapper Mapbox GL Javascript wrapper for ReactJS

JavaScript Expressions in JSX in ReactJs

Welcome, what is JSX Expressions in React Js in Hindi? JSX is an Expression Too After compilation, JSX expressions become regular JavaScript function calls a...

Grokking Call(), Apply() and Bind() Methods in JavaScript

In this article, we will have a look at the call(), apply() and bind() methods of JavaScript. Basically these 3 methods are used to control the invocation of the function.