[Content]: Document Single-Flight Mutations + failures

Đang mở
#777 2 bình luận 1 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
35/100
Loại issue
Tài liệu
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Lĩnh vực
documentation

Hướng nghiên cứu

Bắt đầu bằng cách xem lại SolidStart 1.0 release announcement về Single-Flight Mutations chart và so sánh với phần Actions trong Solid Router documentation. Xác định phạm vi của phần tài liệu mới xoay quanh cách sử dụng, các lỗi mutation và tìm nạp dữ liệu, cũng như mối quan hệ giữa mutation và actions. Được xem là hoàn tất khi các khái niệm liên quan, cách xử lý lỗi và việc điều hướng giữa hai khu vực tài liệu đã rõ ràng.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

help wanted solid
📚 Subject area/topic

SolidStart Single-Flight Mutations

📋 Page(s) affected (or suggested, for new content)

New section rquired

📋 Description of content that is out-of-date or incorrect

It would be useful and important to add documentation for Single-Flight Mutations. This doesn't seem to be documented anywhere. It should include:

  • A description of what it is and how to use it
  • An Eraser chart of how mutations actually work (look at SolidStart 1.0 release announcement for a sample)
  • How to handle failures

Regarding the last point, this came up in a conversation recently in Start Team chat:

From what I understand, if the mutation (action) fails then you handle that as normal, whether by catching the error or using submission state. If one of the data fetches fail then that'll be reflected by whatever createAsync is consuming the data fetch, since SFM just inserts the promise returned by cache on the server into the cache on the client

What's also confusing is the fact that there's an Action section in the router docs however it's unclear how it's related to SFMs. It's slightly confusing that actions are described in router outside of Start as well.

I'm wondering if it's necessary to create a section describing mutations and ensure that users know how to find their way to actions? Perhaps this is a separate issue entirely? I don't see this requested/discussed in other topics so I'll pose it here for now.

🖥️ Reproduction in StackBlitz (if reporting incorrect content or code samples)

No response

Ngôn ngữ chính
MDX
Star
292
Fork
361
Merge trung bình
7 giờ 51 phút
Pull request đã merge (30 ngày)
1

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của solidjs/solid-docs

Tất cả issue của solidjs/solid-docs

Issue tương tự

Thêm issue về Documentation

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.