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

124
Views
object passing as undefined in child component React

I am trying to pass an object as a prop, but I am receiving it as undefined in the child component. If I try the same thing in codesandox works perfect. Any thoughts?

This an example:

Parent Component

import TestPage from "pages/Test"; 

  const text = {
  crono: "crono",
  watch: "clock",
  start: "start",
  stop: "stop",
  split: "split",
  pause: "pause",
  clear: "clear",
};

export default function Base() {
 
  return (
    <section className="main-container">
      <TestPage text={text} />
    </section>
  );
} 

Child Component

export default function Test({ text }) {
  console.log(text);
  return <h1>{text.split}</h1>;
}

here is the complete project

about 4 years ago · Juan Pablo Isaza
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!