Skip to content

Instantly share code, notes, and snippets.

View hamedhafez1's full-sized avatar
🏢
Working from work

Hamed Hafez hamedhafez1

🏢
Working from work
  • Tehran,IR
View GitHub Profile
@FMCorz
FMCorz / example.js
Last active September 20, 2023 08:02
ReactStrap Tabs using React hooks
import React, { useState } from 'react';
import { Nav, NavItem, NavLink, TabContent, TabPane } from 'reactstrap';
export default function MyTabs(props) {
const [activeTab, setActiveTab] = useState('1');
return (
<div>
<Nav tabs>
<NavItem>
<NavLink className={activeTab == '1' ? 'active' : ''} onClick={() => setActiveTab('1')}>