Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

186
Visualizações
Can't import button in react

I need some help with importing the button in react, I am totally new to react

I have created one table where I am displaying the data through JSON and now I want to add one button below the table, when the user clicks on it, it will redirect to a new page

I have imported the Button in my js file

import { Button } from 'react-native';

I have used Button in the render HTML as

<Button variant="primary">Primary</Button>

Code snippet

import React from 'react';
import { Table } from 'react-bootstrap';
import { Button } from 'react-native';
import '../scss/components/table';
import data from '../../public/userData';

export default function ReservedListView() {
  console.log('data :' + JSON.stringify(data));
  let header = Object.keys(data[0]);
  console.log('header :' + header);
  return (
    <div>
      <table id="students" class="table">
        <tbody>
          <tr>
            <th>Name</th>
            <th>Date</th>
            <th>Day</th>
            <th>SimeSlot</th>
          </tr>
          {data.map((el, index) => (
            <tr>
              <td>{el.name}</td>
              <td>{el.date}</td>
              <td>{el.day}</td>
              <td>{el.timeSlot}</td>
            </tr>
          ))}
        </tbody>
      </table>
      <Button variant="primary">Primary</Button>
    </div>
  );
}

I am getting this error when I import the button enter image description here

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

You are developing in React but you want to Import a Button from react-native?

Can you not just use the normal button in React?

https://reactjs.org/docs/handling-events.html

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda