reactjs – ¿ Como puedo obtener los usuarios cuando los busco por nombre ?. Mis usuarios tienen la información anidada estoy trabajando con React Js

Esta es la información de mi usuario y necesito entrar a la parte de “personal”, para así poder buscar por nombre a los usuarios.

    "code": 666666,
    "password": "$2a$10$jk34hizfErhkw2NHAIuhGuNmBQ09u9XVOAcvkA6B4eRKZ0NLy2j.e",
    "status": 1,
    "_id": "6096f63a2e82703bf889b43a",
    "office": {
      "telefone": null,
      "extension": "",
      "status": 1,
      "_id": "60961d883763ed08a49e89a4",
      "createdAt": "2021-05-08T05:11:37.154Z",
      "updatedAt": "2021-05-08T05:11:37.154Z"
    "personal": {
      "name": "Roberto",
      "last_name": "Robles",
      "second_last_name": "Pausini",
      "email": "",
      "_id": "6096f6392e82703bf889b431",
      "createdAt": "2021-05-08T20:36:10.682Z",
      "updatedAt": "2021-05-08T20:36:10.682Z"
    "createdAt": "2021-05-08T20:36:11.461Z",
    "updatedAt": "2021-05-08T20:36:11.461Z"

Intente con esta función pero solo me regresa un campo vacío.

userCtrl.getUserByName = async (req, res) => {
const user = await Users.find({"":});

react – Exibir informações de uma coleção especifica no Firebase usando ReactJS

Boa noite, estou tentando exibir algumas informações de uma coleção no firebase porem não consigo exibir essas informações, eu estou passando um ID da coleção e está retornando no log os dados que eu quero porem não consigo exibir no navegador em html essas informações.

    // retrieve a document
    const chama = firebase.firestore().collection('cursos')
    .then(snapshot => {
    const document =
    // do something with document
    }, ())

inserir a descrição da imagem aqui

I use reactjs and Google does not index all the contents of my site completely and correctly

google dose not index my site totlly: Is it due to coding or server side? i use react js
and for server side rendering, we use next js.

this pic is screen shot of google from my site
enter image description here

and this is a real screen shot from my site:
enter image description here

and this pic is result of gtmetrix website that is correct:
enter image description here

Does Google index all the content of a site?
how can i check server side rendering is working correctly?
can you help me please?

reactjs – Agregar datos a un array por medio de una api react

Tengo el siguiente codigo. Debo agregar a un array los datos obtenidos atraves de la consulta de la api pero el boton no funciona. El boton de agregar se muestra en la descripcion del super heroe cuando muestra los resultados de la busqueda

      superheroData != null ? ( => 
        <div className="search-result">
          <div className="left">
            <img src={superhero.image.url} alt="super pic" />
          <div className="right">
            <span style={{ color: "gray", marginBottom: 5 }}>
            <div className="stats">
              <div>strength: {superhero.powerstats.strength}</div>
              <div>speed: {superhero.powerstats.speed}</div>
              <div>power: {superhero.powerstats.power}</div>
          <button onClick={()=> addTeam(superhero)}>Agregar heroe al equipo</button>

esta es la funcion para agegar el heroe a un array para luego mostrarlo

function addTeam(superhero){

reactjs – How can I remove an input and clear data in that input?

I am trying to create a button that add more input and remove input and when it remove the input it also clear all the data inside that input but the problem is when I remove that input but the data still stay. How can I fix that ?

Here is my code base:

const (inputs, setInputs) = useState(teamData.rules);

  useEffect(() => {
  }, (teamData));

  // Add more input
  const addInputs = () => {
    setInputs((...inputs, { name: `rule-${inputs.length + 1}` }));

  // handle click event of the Remove button
  const handleRemoveClick = (index) => {
    const list = (...inputs);
    list.splice(index, 1);

  {, index) => (
    <div className="agreement-form-grid" key={index}>
        onClick={() => handleRemoveClick(index)}
        <Remove />
        placeholder={`Rule ${index + 1}`}
  {inputs.length !== 4 && (
    <div className="team-agreement-add-rule">
      <button type="submit" onClick={addInputs}>
        <Add />

javascript – Can I use both next.js and react.js in one application?

Beginner here. I’m planning to use next.js for most of the basic routing, pages, and components (since configuring router is not needed in next), and react for other additional functionalities that are not necessarily included with next.js, then using express/node for the backend.

I would like to know if it’s a good practice to combine next and react to build my web app

reactjs – React.js height 100%

estoy intentando hacer mi primera app web con react.js y necesito que mi ocupe todo el alto de la página. Vi que poniendo lo siguiente en “App.css” era suficiente:

  height: 100%;
  min-height: 100%;

Luego tengo un display grid:

  display: grid;
  gap: 3px;
    "header      header"
    "subjectsbar writearea"

Pero no me funciona en react, simplemente se ve como si nada ocurriese, si saben como solucionarlo por favor contactarse.

reactjs – How to get page transitions for every page of an Ionic 5 React App?

I’m building an app with Ionic 5 and React that I thought would be working like a SPA.

My problem is that I don’t get any page transitions. When I click on a link to a subpage, the browser loads the page as you’d expect it from a classic website.

I tried the approach they recommend in their documentation, but it didn’t work.

How can I get transitions for every page without classic browser loading?

Thanks in advance!

reactjs – Como traducir una tabla de DataGrid en React a esEs

import React from 'react';
import { makeStyles } from '@material-ui/core/styles';
import { DataGrid, esES } from '@material-ui/data-grid';

const useStyles = makeStyles((theme) => ({

const columns = (
    { field: 'id', headerName: 'ID',},
    { field: 'firstName', headerName: 'First name',},
    { field: 'lastName', headerName: 'Last name',},
        field: 'age',
        headerName: 'Age',
        type: 'number',
        field: 'fullName',
        headerName: 'Full name',
        description: 'This column has a value getter and is not sortable.',
        sortable: false,

const rows = (
    { id: 1, lastName: 'Snow', firstName: 'Jon', age: 35 },
    { id: 2, lastName: 'Lannister', firstName: 'Cersei', age: 42 },

const TablaPrecios = () => {
    const classes = useStyles();

    return (
        <div style={{ height: 400, width: '100%' }}>

export default TablaPrecios;
<script src=""></script>
<script src=""></script>

sql – Reactjs with large DB

I am working with a very large SQL database through a frontend reactjs application with a node server intermediary using an ORM for query sanitation. However due to the size of the DB it takes some time to search through, sometimes up to 15-25 seconds which makes my react app incredibly slow for the initial load.

I have a spinner component to let the user know its working and am working on optimizing the DB itself but it is a collaborative effort so I was hoping to find something from the frontend perspective to try and alleviate the intense loading times. Are there any standard practices that would let me keep portions of the data off database so that I don’t have to wait for the entire query to finish that wouldn’t severely risk user data?