Freelance Project Requests Software Development in C# WPF Asp.Net Core Vba Excel Word SQL-Server EF Linq, UWP Net


Error Message in React


Unhandled Rejection (Error): input is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.

    in input (at Edit.js:109)

    in div (at Edit.js:99)

    in form (at Edit.js:98)

    in div (at Edit.js:87)

    in Edit (created by Context.Consumer)

    in Route (at App.js:22)

    in div (created by Container)

    in Container (at Layout.js:12)

    in div (at Layout.js:10)


Faulty React Code


//--< IsLoaded >--

< form className="submit-form">



<input>{" " + this.state.title} </input>




You can't insert in React into an input form field .this.state.variable


<input type="text" name={title} value={title}/>


AND the <input /> tag muss with a closing / character can only be written as a one-tag with ending />


<input type="text" value={this.state.title} />





Solution Code Example:


return (


            //----< return >----     

            <div className="submit-form">


                    //--< IsLoaded >--

                    <form className="submit-form">


                            <input type="hidden" value={this.state.idarticle} />


                            <input type="text" value={this.state.title} />



                            <button type="submit">Update</button>



                    //--</ IsLoaded >--



            //----</ return >----





Contact for Jobs, Project Requests: