score:1
Accepted answer
you are very likely to forget importing bootstrap.css
here is a minimize working version of your code:
import react, { usestate } from "react";
import reactdom from "react-dom";
import { tabs, tab } from "react-bootstrap";
import "bootstrap/dist/css/bootstrap.min.css";
function coindata(props) {
const [key, setkey] = usestate("chart");
return (
<div>
<tabs
classname="tabs"
id="controlled-tab-example"
activekey={key}
onselect={(k) => setkey(k)}
>
<tab eventkey="chart" title="charts">
<h1>1</h1>
</tab>
<tab eventkey="track" title="tracker">
<h1>2</h1>
</tab>
</tabs>
</div>
);
}
const rootelement = document.getelementbyid("root");
reactdom.render(<coindata />, rootelement);
Source: stackoverflow.com
Related Query
- react bootstrap tabs component renders all tabs
- Bootstrap Modal renders in React Component but is not visible
- React Bootstrap 5 - Tabs component with Previous Next Button
- Why React component only renders one item in array once but iterates through all items?
- React Bootstrap component (Form.Control) OnChange event listener doesn't fire when select all text and delete
- How can I reset a react component including all transitively reachable state?
- How can I block a React component to be rendered until I fetched all informations?
- Rendering a React component inside a Bootstrap popover
- React - How to detect when all sub-components of a parent component are visible to the user?
- React Route Component handle all "/" routes EXCEPT for "/login"
- React Bootstrap Validation use validated input in sub component
- React - load all data from json into component
- React input checkbox select all component
- How to unit test a React component that renders after fetch has finished?
- Changing the CSS for a React component has effect on all other pages
- Show all variations of a component on a single page in React Storybook but still have Knobs?
- How do I pass all state variables inside react hooks to my child component
- Jest enzyme shallow test is not rendering all elements of the React component
- React component sometimes renders twice with unchanged state
- How to display all options in react bootstrap typeahead menu with existing selection
- Hide component that renders a Tabs
- Have React bootstrap component (popover) change position automatically
- React tabs - switching destroys component, need to maintain the same component
- Accessing all props in nested propTypes in a React component
- How to create a React component for a bootstrap alert?
- react not found component always renders
- bootstrap progress bar doesn't render inside react component
- How to type a React component that accepts another component as a prop, and all of that component's props?
- Too many re-renders. React limits the number of renders to prevent an infinite loop. Updating state of a functional component inside the render method
- React Router Still Renders Previous Page after Routing to New Component
More Query from same tag
- Targeting nested object properties inside an parent object
- Recursive Function in React.JS Component class
- Parse Error: Line 9: Unexpected identifier in react
- React onScroll not working
- issue with the Authorisation: Bearer access_token (the headers) in Axios POST in reacts
- Draft-js: auto line break
- Using material-ui's APIs, how do I set a background image in the body?
- useEffect with empty array doesn't behave as componentDidMount()
- Override dynamic route if exact match is found
- Calling function inside condition - Reactjs
- ReactJS using cookie while rendering on server side
- How to add required attribute on specific table row index in react js?
- SVGs don't show on Firefox
- How to return only 1 item in an array in react using map function
- How to reduce renders using redux + normalizr
- Can't get arrow functions to work (React, Babel, Webpack, ES6)
- make behavior of components independent
- React router rendering two child components instead of just one
- I am trying to fetch json data from Rest API into react, but it showing some error
- Unexpected token p in JSON at position 0 in fetch
- Generate unique ID with React form
- React loop component communication
- How to center text within a border-radius?
- how to confirm password in react to change it and post in api?
- State was undefined for like 0.3s and then got data from API
- What is most performant way to iterate nested javascript objects and render inside jsx
- React error with code splitting (Argument type function() is not assignable to parameter type)
- handling apollo-server errors on client
- How do you update your project to use the latest version of javascript?
- React Redux Toolkit access value inside array of objects