So I’m just trying out different ways how I can render my components, but for some error gives me ‘TextareaInput is not defined’ for ```
import React,{ Component } from 'react';
class TextFormEntry extends Component {
constructor(props) {
super(props);
}
TextareaInput() {
return (
<textarea className='textarea-input' rows="10" cols="50">
At w3schools.com you will learn how to make a website. We offer free tutorials in all web development technologies.
</textarea>
);
};
render() {
<div>
<TextareaInput />
</div>
}
}
export default TextFormEntry;
This method works but why not the former:
render() {
return (
<textarea className='textarea-input' rows="10" cols="50">
At w3schools.com you will learn how to make a website. We offer free tutorials in all web development technologies.
</textarea>
);
Things I’ve tried:
- function TextareaInput()
- const TextareaInput = () => {…}
- removed enclosed div