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

265
Views
Can we render the extended component and wrap the render?

Actually I wanted to create a custom component for rechart using the component from the rechart library. When I try to render the data i am unable to see the output. Let me show you some example.

import { LineChart as ReLineChart} from 'recharts';

export class MyLine extends ReLine {
    static defaultProps = {
        ...ReLine.defaultProps,
        // Customized props
        strokeWidth: 2,
        dot: false,
        
    };  
}

When I use <MyLine /> it is rendering properly and I can see the output in the browser a Line drawn and I can also pass the props required in the jsx. But when I use a render function in the class component the line is not getting rendered. Can anyone provide me a solution to get it rendered

export class MyLine extends ReLine {
    static defaultProps = {
        ...ReLine.defaultProps,
        // Customized props
        strokeWidth: 2,
        dot: false,
        
    };  
render(){
return <div>{}</div>
}

Provide me a solution.

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!