Open maxclav opened 6 years ago
Hi, i'm new to web dev, How can i correct this error: I want Typist components to get the defaultvalue of the textarea
import React from 'react'; import './index.css'; import Typist from 'react-typist'; // https://github.com/jstejada/react-typist //! WITH WARNINGS, ERRORS AND TYPIST class Message extends React.PureComponent { render() { const dearMessage = "Dear Maxime, "; return ( <div className="contact-message"> <Typist> <textarea id="contact-textarea" name="message" spellCheck="false"> {dearMessage} </textarea> </Typist> </div> ); } } export default Message
index.js:1452 Warning: Use the defaultValue or value props instead of setting children on in textarea (created by Typist)
defaultValue
value
this one doesnt work with typist but doesnt create warnings/errors
(...) //! WITHOUT WARNINGS, ERRORS AND TYPIST class Message extends React.PureComponent { render() { const dearMessage = "Dear Maxime, "; return ( <div className="contact-message"> <textarea id="contact-textarea" name="message" spellCheck="false" defaultValue={dearMessage}> </textarea> </div> ); } } (...)
thank you for your time and help
Hi, i'm new to web dev, How can i correct this error: I want Typist components to get the defaultvalue of the textarea
this one doesnt work with typist but doesnt create warnings/errors
thank you for your time and help