Giter VIP home page Giter VIP logo

Comments (6)

joshglenn avatar joshglenn commented on July 19, 2024

I am also having this same problem

from snack-web.

joshglenn avatar joshglenn commented on July 19, 2024

I looked into this a little further.

Maintainers: could it have something to do with this?

And is it an expo snack-web issue or a react-navigation issue?

from snack-web.

joshglenn avatar joshglenn commented on July 19, 2024

To get a little more insight into this:

In the Hello React Navigation page of react-navigation's docs, the first snack example link is this

And as of this writing, it does not work. But if you edit the package.json inside the snack, and change it from this:

{
  "dependencies": {
    "@react-native-community/masked-view": "^0.1.7",
    "@react-navigation/native": "^5.1.3",
    "@react-navigation/bottom-tabs": "^5.2.4",
    "react-native-safe-area-context": "^0.7.3",
    "react-native-screens": "^2.4.0",
    "@react-navigation/drawer": "^5.3.4",
    "react-native-reanimated": "^1.7.0",
    "@react-navigation/material-bottom-tabs": "^5.1.6",
    "react-native-paper": "^3.0.0",
    "@react-navigation/material-top-tabs": "^5.1.6",
    "react-native-tab-view": "^2.0.0",
    "@react-navigation/stack": "^5.2.6"
  }
}

to this:

{
  "dependencies": {
    "@react-native-community/masked-view": "0.1.7",
    "@react-navigation/native": "5.1.3",
    "@react-navigation/bottom-tabs": "^5.2.4",
    "react-native-safe-area-context": "^0.7.3",
    "react-native-screens": "2.4.0",
    "@react-navigation/drawer": "^5.3.4",
    "react-native-reanimated": "^1.7.0",
    "@react-navigation/material-bottom-tabs": "^5.1.6",
    "react-native-paper": "^3.0.0",
    "@react-navigation/material-top-tabs": "5.1.6",
    "react-native-tab-view": "^2.0.0",
    "@react-navigation/stack": "5.2.6"
  }
}

It will begin to work.

from snack-web.

joshglenn avatar joshglenn commented on July 19, 2024

What do you think is the solution to this?

When I started learning Expo, one of my key pain points was this: When I try a snack, 80% of the time they were broken. That was a real pain. I know it has to do with the nature of npm's package system. So many projects don't lock their versions down, so one repo updates and breaks apps and snacks all over the ecosystem.

I was taking a look at that snack link that I posted in my last comment... and I see that the dependencies are coded in there. Is it safe to say that they (in this case React navigation) should lock down the version numbers in their example snacks and/or projects if they want to keep this from happening?

from snack-web.

joshglenn avatar joshglenn commented on July 19, 2024

@faisalchishtii to make the first snack work on that page you mentioned, open the snack, and change package.json to:

{
  "dependencies": {
    "@react-native-community/masked-view": "0.1.7",
    "@react-navigation/native": "5.1.3",
    "@react-navigation/bottom-tabs": "5.2.4",
    "react-native-safe-area-context": "0.7.3",
    "react-native-screens": "2.4.0",
    "@react-navigation/drawer": "5.3.4",
    "react-native-reanimated": "1.7.0",
    "@react-navigation/material-bottom-tabs": "5.1.6",
    "react-native-paper": "3.0.0",
    "@react-navigation/material-top-tabs": "5.1.6",
    "react-native-tab-view": "2.8.0",
    "@react-navigation/stack": "5.2.6"
  }
}

That got it working for me.

None of the React navigation examples working on the web for me:

All examples are giving below error:
https://reactnavigation.org/docs/drawer-based-navigation/

Device: (900:881) Attempted to assign to readonly property.
Evaluating module://@react-navigation/native.js
Evaluating module://@react-navigation/drawer.js
Evaluating module://App.js.js
Loading module://App.js

image

I am getting same error when I try it using the Expo appon my Android device.

from snack-web.

IjzerenHein avatar IjzerenHein commented on July 19, 2024

Hi 👋

The issues with Snack and react-navigation have been resolved.
I'm going to close this but feel free with new reproduction steps if this still happens for you. 👍

from snack-web.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.