javascript - [Multiple Picture Warning] When reactjs clicks on a table to edit content, the id error is reported as undefined when jumping to pass the value this.context.router.params.id
我想大声告诉你
我想大声告诉你 2017-07-05 10:37:17
0
1
1226

I would like to ask you all, as mentioned above, when you click "Edit" on a row of a table to change its content, use
this.context.router.push("/user/edit/" user .id) jump to pass value. When using this.context.router.params.id to obtain the id in the editing component, the error Cannot read property 'id' of undefined is reported? ? It's quite confusing, please give me some advice. . . The details are as follows:
The first is the table page, with an edit button at the bottom and a jump function above:

Secondly, the routing settings of index.js should be fine:

It is the editing page again, to automatically fill in the form after obtaining the data. There are some verification rules:

我想大声告诉你
我想大声告诉你

reply all(1)
学霸

Check the this.context.router.params value in the editing component. You are reporting an error because this value is undefined. See if you can access this value

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!