data-layoutconformance="strict" conflicts with expo-router Stack
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
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- javascript, react
- Lĩnh vực
- mobile
Hướng nghiên cứu
Bắt đầu với việc tái hiện Expo trong app/_layout.tsx, so sánh wrapper Stack bị lỗi với wrapper Slot đang hoạt động. Tái hiện lỗi ràng buộc layout native, sau đó truy tìm xem lỗi nằm ở việc tích hợp react-strict-dom hay native stack của Expo Router; hoàn thành khi Stack render root layout mà không có app trống hoặc lỗi ràng buộc.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Describe the issue
When attempting to wrap the root layout file in <html.div data-layoutconformance="strict"> I get the error below (and a blank app, rendering does not work). Switching from a Stack to a Slot and everything works fine. Also, wrapping an entire page seems to work (ie: 'app/index.tsx`)
import "../stylex.css";
import { Stack } from "expo-router";
import { html } from "react-strict-dom";
export default function RootLayout() {
return (
<html.div data-layoutconformance="strict">
<Stack />
</html.div>
);
}
Not quite sure how supported expo is, and it's quite likely this isn't an expo specific issue but rather a react-navigation and/or react-native-screens issue, since this is probably conflicting with the native stack (and why a Slot works but Stack doesn't). I just though I'd mention it because most likely there's quite a few people out there trying to test out react-strict-dom using expo/expo-router and probably are running into the same issue as the root _layout file is the most obvious place to stick this tag in an expo-router based project.
[UIKitCore] Unable to simultaneously satisfy constraints.
Probably at least one of the constraints in the following list is one you don't want.
Try this:
(1) look at each constraint and try to figure out which you don't expect;
(2) find the code that added the unwanted constraint or constraints and fix it.
(Note: If you're seeing NSAutoresizingMaskLayoutConstraints that you don't understand,
refer to the documentation for the UIView property
translatesAutoresizingMaskIntoConstraints)
(
"<NSAutoresizingMaskLayoutConstraint:0x60000218f8e0 h=-&- v=--& index.minY == 53.6667
(active, names: index:0x1010df540, '|':UILayoutContainerView:0x10fc55ff0 )>",
"<NSAutoresizingMaskLayoutConstraint:0x60000218d2c0 h=-&- v=--& index.height == 44
(active, names: index:0x1010df540 )>",
"<NSLayoutConstraint:0x600002102c10
V:[index]-(0)-[UIFocusContainerGuide:0x600003d24b40'UINavigationControllerContentFocusContainerGuide']
(active, names: index:0x1010df540 )>",
"<NSLayoutConstraint:0x600002102c60
UIFocusContainerGuide:0x600003d24b40'UINavigationControllerContentFocusContainerGuide'.bottom
== UILayoutContainerView:0x10fc55ff0.bottom (active)>",
"<NSLayoutConstraint:0x600002194550 'UIView-Encapsulated-Layout-Height'
UILayoutContainerView:0x10fc55ff0.height == 0 (active)>"
)
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x600002102c10
V:[index]-(0)-[UIFocusContainerGuide:0x600003d24b40'UINavigationControllerContentFocusContainerGuide']
(active, names: index:0x1010df540 )>
Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in
the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in
<UIKitCore/UIView.h> may also be helpful.
Expected behavior
None really
Steps to reproduce
Create new expo project, try to follow installation docs for react-strict-dom as best as possible (they are not expo-router specific), wrap app/_layout.tsx in <html.div data-layoutconformance="strict">, see error on native
Test case
No response
Additional comments
No response
- Ngôn ngữ chính
- JavaScript
- Star
- 3.6k
- Fork
- 206
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
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.
Issue khác của react/react-strict-dom
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
react/react-strict-dom#467 · 1 bình luận ·
-
Missing disabled propĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
react/react-strict-dom#465 · 2 bình luận ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
react/react-strict-dom#520 ·
-
css.defineVars() with kebab-case keys warns unrecognized custom property and fails to resolveĐang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 35/100
react/react-strict-dom#505 · 2 reaction ·
-
bug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 62/100
react/react-strict-dom#491 · 4 bình luận ·
Tất cả issue của react/react-strict-dom
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
solana-foundation/solana-com#2202 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
yegor256/copyrights-action#216 ·
-
[BUG] onScroll never refreshes the window container's height after a vertical-only viewport resizeĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
juliangarnier/anime#1192 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
PedestrianDynamics/pyFDS-Evac#226 ·
Maintainer thường phản hồi trong vòng 1 ngày