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

184
Views
Text area not rendering React

I'm not sure why my text area isn't rendering if someone could suggest what I'm missing or what I've done wrong I'd be forever grateful.

I'm not sure whether maybe I should try rending it in the App.js file.

I'm also sure I don't need to import the App.js file to the CardCheck.js because it's a child.

import "./App.css";
import React from "react";
import CardCheck from "./CardCheck";

class App extends React.Component() {
  state = {
    cardNumber: "",
  };

  handleChange = (event) => {
    this.setState({ cardNumber: event.target.value });
  };

  handleClick = () => {
    const { cardNumber } = this.state;

    this.setState({
      cardNumber: "",
    });
  };

  render() {
    const { cardNumber } = this.state;

    return (
      <div className="App">
        <h1>Taken Yo Money</h1>
        <CardCheck
          cardNumber={cardNumber}
          handleChange={this.handleChange}
          handleClick={this.handleClick}
        />
      </div>
    );
  }
}
export default App;


function CardCheck(props) {
  const { cardNumber, handleChange, handleClick } = props;

  return (
    <div className="TweetInput">
      <div className="bar-wrapper"></div>
      <textarea onChange={handleChange} value={cardNumber}></textarea>
      <footer>
        <button onClick={handleClick}>Enter Card Details</button>
      </footer>
    </div>
  );
}
export default CardCheck;
about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

Remove the parentheses from class App extends React.Component(). It should be

class App extends React.Component {
    //rest of the code
}
``
about 4 years ago · Juan Pablo Isaza Report

0

You need to replace class App extends React.Component() with class App extends Component { The Component is imported from import React, { Component } from "react";

It should fix the rendering issue

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!