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

143
Views
What's the error "Objects are not valid as a React child (found: object with keys {_id, name, img, des, price, quantity, sName})."

I don't understand why I'm getting this error. I want to understand what's wrong with the following code.

const Book = ({ book }) => {
    const navigate = useNavigate()
    const { _id, name, des, price, quantity, img, sName } = book;
    return (
        <div className='bg-white rounded-xl p-5'>
            <div className='p-5'>
                <img className='rounded-xl hover:shadow-2xl hover:shadow-black transition ease-in- 
                     out  hover:scale-110  duration-700' src={img} alt="" />
            </div>

            <h4 className='text-xl text-red-400 font-serif my-5'>{name}</h4>
            <h6 className='text-red-400 text-xl font-serif py-3'>Price : ${price}</h6>
            <h6 className=' flex justify-between px-5 font-semibold text-gray-500 font-serif'>
                <span className=''>Stock in : {quantity}</span>
                <span>Supply by {sName}</span>
            </h6>
        </div>

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!