Posts by Jean dos Santos • 11 points
6 posts
-
0
votes1
answer43
viewsA: How to modify a nested object in React?
wouldn’t be like this ? const onSubmit = () => { const newClinic = { name: clinic.name, email: clinic.email, cnpj: clinic.cnpj, phone: clinic.phone, address: { state: clinic.address.state, .... }…
reactanswered Jean dos Santos 11 -
0
votes3
answers130
viewsA: Table with data array
create method somewhere and call from tbody. It can be in another Component file. renderRows() { return array.map(d => { return ( <tr key={d.id}> <td>{d.id}</td>…
-
0
votes3
answers130
viewsA: Table with data array
Looks like the data then coming in array... that’s why you need to tell the position. If it’s a data array even what you want, you should scroll through that array ... renderRows() { return…
-
0
votes1
answer140
viewsA: How to Query Table Too Much for Many Knex
I achieved the desired result with the following method: const getAll = (req, resp) => { knex({ pc: 'product_category' }) .join('products as p', 'pc.product_id', '=', 'p.id') .join('categories as…
-
0
votes1
answer140
viewsQ: How to Query Table Too Much for Many Knex
I’m trying to do a query in a relation many to many, but it’s not going well as I expected... the method I did was like this: const getAll = async (req, resp) => { knex({ pc: 'product_category'…
-
-1
votes1
answer658
viewsQ: How do I show the error message sent by Express?
I have the following method in back-end, who logs in: const login = async (req, resp) => { try { if (!req.body.id) throw 'Necessário Informar ID'; const ongFromDB = await…