Created
September 7, 2019 12:15
-
-
Save fernandoabolafio/ccb960600495de45c4b75f743b381d7c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react"; | |
import ReactDOM from "react-dom"; | |
import { Tabs, Tab } from "react-bootstrap"; | |
import useQueryString from "./useQueryString"; | |
import "./styles.css"; | |
function App() { | |
const [value, onSetValue] = useQueryString("water"); | |
return ( | |
<div className="App"> | |
<h1>Tabs and query string example</h1> | |
<Tabs activeKey={value} onSelect={onSetValue}> | |
<Tab eventKey="water" title="Water" /> | |
<Tab eventKey="coffe" title="Coffe" /> | |
<Tab eventKey="tea" title="Tea" /> | |
</Tabs> | |
</div> | |
); | |
} | |
const rootElement = document.getElementById("root"); | |
ReactDOM.render(<App />, rootElement); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment