Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

188
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!