Recently developed too busy, there is no time to update the blog, want to use this blog to summarize the relevant experience, in case the following can be used:
First, Antd
1.onChange of undefined problem: it is possible that the form in the page has the same name, or the parent element of the time-out form does not have a unique key set.
Wait for update ...
Second, ES6
Wait for update ...
Third, Mongoose
1. When querying, if you encounter an association relationship that queries multiple tables, you can check through the Populate property, for example:
Ser = await weblogicserver.find ({_id:_id}). Populate (' oth_id ', ' name '). Select (' name '). exec (); // oth_id for foreign key, the data to be detected is [{_id: ' xxx ', oth_id:{_id: ' xxx ', Name: ' Name '},name: ' name '}]
2. When querying many tables, it is possible to add a uniform foreign key _id to each item when the array push is available, so that it is convenient to query the owning relationship.
3. Array object check weight (via _id)
// Remove duplicate objects by ID function Uniqueobj (arr) { = {}; = []; Arr.foreach (function(NI) { if(! OBJ[NI._ID]) { = ni; } }); for inch obj) { List.push (obj[k]); } return list;}
Wait for update ...
ANTD + node. js + Mongoose Small Summary