https://codesandbox.io/s/simple-line-chart-forked-h39zlx?file=/src/App.tsx
how to use react map for below link , line number 31 in App.tsx ?
const Tabs = [
{
tabname: "tab2"
},
{
tabname: "tab3"
},
{
tabname: "tab4"
}
];
<a to="" className={`tab ${active === "tab2" ? "active" : ""}`} onClick={() => setActive("tab2")}>
Align & Ratio
</a>
If linking to an external page that is not a part of your React application, than use <a>, else use <Link>.
and use "href=" with <a> and "to=" with <Link>.
{Tabs.map((obj, i) => (
<p key={i} onClick={() => setActive(obj.tabname)} className="tab">
{/* Align & Ratio */}
{obj.tabname}
</p>
))}
https://codesandbox.io/s/simple-line-chart-forked-v25zdp?file=/src/App.tsx