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

110
Views
How to load a specific class name on only first active UI react

wanted to load a class name "Landingpage" to body tag or main container div only if the first tab/section (Overview page) is active. tab sections are in a child component. Please help

https://codesandbox.io/s/nested-router-ui-cvdzpe?file=/src/DatavisualizationAll.js

https://cvdzpe.csb.app/SubpageLanding/Datavisualization

function Datavisualization(props) {
  const [active, setActive] = useState("tab1");
  const isActive = (key) => (active === key ? "active" : "");
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

className={active === "tab1" ? "landing-page" : ""}

kindly add some character in your class name "Landing Page" or remove space otherwise class will not work.

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!