Translation feature in concurrent mode's example CodeSandbox might not work.
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- JavaScript
- Star
- 11.8k
- Fork
- 7.9k
- Merge trung bình
- 1 ngày 11 giờ
- Pull request đã merge (30 ngày)
- 11
Mô tả
https://reactjs.org/docs/concurrent-mode-patterns.html#splitting-high-and-low-priority-state
In above section's example CodeSandbox, yandex-translate is used for translation feature.
But, translation doesn't work when I open the CodeSandbox.
↓ The translation result should appear under the input.

And I got a following message from the response of translate().
// fakeApi.js
export function fetchTranslation(text) {
const promise = new Promise(
(resolve, reject) => {
translate(
text,
{
to: "fr"
},
(err, res) => {
if (err) {
reject(err);
} else {
console.log(res) // <- Added this line
resolve(res.text);
}
}
);
}
);
return wrapPromise(promise);
}
code: 404
message: "Maximum daily translated text volume exceeded"
This is not an example code's bug, but it can be confusing for beginners. (Actually, I suspected a bug in the React part of the code at first.)
Can we avoid this problem? For example, use other translation feature, use another plan(?) of yandex-translate.
Thanks.
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Mở tài liệu về các pattern của Concurrent Mode và CodeSandbox được liên kết trong đó, sau đó kiểm tra đường dẫn dịch của ví dụ trong fakeApi.js. Xác nhận lý do yêu cầu yandex-translate trả về lỗi quota được báo cáo và xác định một cách được hỗ trợ để giữ cho ví dụ vẫn có thể sử dụng. Hoàn tất khi kết quả dịch xuất hiện bên dưới input mà không phụ thuộc vào quota dịch không khả dụng.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- javascript, react
- Lĩnh vực
- documentation
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 30/100