Theo em hiểu thì khi react build các biến môi trường trong file .env cũng sẽ được sử dụng vào compile time, ví dụ biến REACT_APP_API_V1 trong file .env và build Docker image thì khi dùng proccess.env.REACT_APP_API_V1 sẽ ...
Stack Ask Latest Questions
Cho em gợi ý về framework ngon , dễ dùng và có UI, UX đẹp cho người dùng . Để em làm dự án cho đẹp cv
Em biết anh không chuyên React nhưng em đăng hi vọng mọi người có thể support. Em muốn hỏi sự khác biệt sử dụng redux, react useReducer và việc sử dụng setState. Trong trường hợp nào nên dùng ...
Hi ae, Vì sao bên network có trả về content-disposition, mà khi e dùng axios thì nó không trả về content-disposition. Thanks all!
Hi mn, Em muốn khi click vào button download thì tải về file template. E đặt file template vào cùng thư mục. Đây là đoạn code: import batchTemplate from "./template.xlsx"; function downloadTemplate() { axios({ url: batchTemplate, method: "GET", headers: { "Content-Disposition": "attachment; filename=template.xlsx", "Content-Type": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" }, responseType: "arraybuffer" }).then(response => { console.log(response); const url = window.URL.createObjectURL(new Blob([response.data])); console.log(url); const link = document.createElement("a"); link.href = url; link.setAttribute("download", "template.xlsx"); //or any other extension document.body.appendChild(link); link.click(); }); } Chạy local ok. Nhưng lên server thì ...
I’m a 23 year old man deciding between 2 schools, both of which would provide me with a tuition waiver and stipend to live on. I currently work a full-time job that pays relatively well, but I’m itching ...