fill antd form fields with props

  antd, javascript, reactjs

I got simple blog (react/redux) (only frontend part). With user registration and articles. And stuck when tryed to fill fields of article editor form.

In "ArticleEditor" component. When I try edit article I got all values in props, and can see it in console log

console.log('title:', this.props.title); // title 

but how to add it to form fields? In form fields values i got –

value={this.props.title}

but fields its empty. Should i need to somehow update this form? Is’t it update when it recieve props?

Plz help if you have good knowledge in React/Redux.

here is the code: https://codesandbox.io/s/blissful-chatterjee-e82j6

Source: Ask Javascript Questions

LEAVE A COMMENT