return (
<b>{
const a = props.users.find((user) => user.id === post.userId)
console.log(a) // I want to console.log
return a
}</b>
);
Run Code Online (Sandbox Code Playgroud) 我需要将生成的 PDF 作为 Whatsapp 消息发送,但当我尝试读取我的文件时,它显示错误。
easyinvoice.createInvoice(data, function(result) {
//The response will contain a base64 encoded PDF file
fs.writeFileSync("invoice.pdf", result.pdf, 'base64');
var s = result.pdf;
client.messages
.create({
mediaUrl: s,
body: 'invoice',
from: 'whatsapp:+somenumber',
to: 'whatsapp:+somenumber'
})
.then(message => console.log(message.sid))
.done();
});
Run Code Online (Sandbox Code Playgroud) express ×1
javascript ×1
jsx ×1
node.js ×1
reactjs ×1
tslint ×1
twilio ×1
twilio-api ×1
typescript ×1