Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rendering issue when switching screen using react-navigation in combination w/ react-native-web #37

Closed
nikgraf opened this issue May 13, 2022 · 7 comments
Assignees

Comments

@nikgraf
Copy link

nikgraf commented May 13, 2022

When switching to the page it looks like this:
Screenshot 2022-05-13 at 13 15 47

When refreshing the page it looks like this (and this is how it supposed to be):
Screenshot 2022-05-13 at 13 15 55

Code:

      <Text style={tw`mt-4 mb-1`}>Nodes</Text>
      <Tiles style={tw`max-w-lg`} space={4} columns={10}>
        <Icon name="at-line" />
        <Icon name="code-s-slash-line" />
        <Icon name="double-quotes-l" />
        <Icon name="heading" />
        <Icon name="h-1" />
        <Icon name="h-2" />
        <Icon name="h-3" />
        <Icon name="h-4" />
        <Icon name="h-5" />
        <Icon name="h-6" />
        <Icon name="indent-decrease" />
        <Icon name="indent-increase" />
        <Icon name="list-check" />
        <Icon name="list-check-2" />
        <Icon name="list-ordered" />
        <Icon name="list-unordered" />
        <Icon name="paragraph" />
        <Icon name="table-2" />
        <Icon name="text" />
      </Tiles>

This seems like a general issue with the library. I also noticed it on other pages. Any ideas?

@mobily mobily self-assigned this May 13, 2022
@nikgraf
Copy link
Author

nikgraf commented May 17, 2022

@mobily seems like it's an issue with react-native-web itself or react-navigation because I noticed it also happens on screens where stacks is not used

@nikgraf nikgraf closed this as completed May 17, 2022
@nikgraf nikgraf reopened this May 17, 2022
@nikgraf
Copy link
Author

nikgraf commented May 17, 2022

Actually realized we used stacks more than I thought and all cases were stacks related.

For a horizontal stack I nailed down the issue to a broken flex-ba
Screenshot 2022-05-17 at 22 33 48
sis setting.

This might be related: necolas/react-native-web#1264

@mobily
Copy link
Collaborator

mobily commented Jun 5, 2022

hello @nikgraf! 👋 thanks for posting this issue, could you try with v2.1.0, please? also, if this still occurs, a repro repo would be helpful! 🙏

@mobily mobily assigned nikgraf and unassigned mobily Jun 5, 2022
@nikgraf
Copy link
Author

nikgraf commented Jun 9, 2022

@mobily still happening :(

Screenshot 2022-06-09 at 13 52 31

@nikgraf
Copy link
Author

nikgraf commented Jun 9, 2022

sorry, don't have time to setup a full repro. we are using react-navigation and after switching between screens it sometimes happens. Could be something wrong with our setup

@vbylen
Copy link

vbylen commented Jun 14, 2022

@nikgraf I replaced all instances of <Stack/> and <Inline/> with <Box/>, and removed flex='content'. This seems to have solved the problem. Not ideal, but it works.

edit: it seems fixed now in the latest version

@makhataibar
Copy link

I was update react-native-web to latest version (0.18.1) and all works correctly now. But I don't know, can I upgrade RNW without Expo migration guide?

@mobily mobily closed this as completed Oct 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants