Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

186
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda