Giter VIP home page Giter VIP logo

Comments (13)

frederikhors avatar frederikhors commented on September 18, 2024

Maybe in case of nested routers and a solution for <Router pending={Loading}/> we can avoid repetition of pending... for sub-routers...

from yrv.

pateketrueke avatar pateketrueke commented on September 18, 2024

Sounds fair, the same as exact from top-level routers.

My only concern on inheriting stuff from routers is keeping the context safe, e.g.

<Router exact>
  <Route a />
  <Route b />
  <Router>
    <Route c />
  </Router>
</Router>

The nested-router here should not inherit the exact down to its routes or it should? 🤔

So, a and b are exact routes, but c should be exact too or not?

from yrv.

frederikhors avatar frederikhors commented on September 18, 2024

I think every Router should inherit from parent but can set its context.

Is it wrong?

from yrv.

pateketrueke avatar pateketrueke commented on September 18, 2024

Is it wrong?

I'm not sure, but think about this: imagine you don't known that the top-level router is exact, and you mount some routes somewhere else inside its context.

You put some routes that are not exact, but suddendly they behave as exact, because its parent router inherited the exact prop from the top-level router.

Do you think that is completely expected?

IMHO I would not inherit from router to router, only routes should inherit stuff from its parent-router, and nothing else — that makes perfect sense to me.

from yrv.

frederikhors avatar frederikhors commented on September 18, 2024

IMHO I would not inherit from router to router, only routes should inherit stuff from its parent-router, and nothing else — that makes perfect sense to me.

Makes sense. Go with it! :)

from yrv.

jhechtf avatar jhechtf commented on September 18, 2024

In theory I have some code that would work for this issue. I simply cannot get your testing setup to work for me no matter what computer I try it on though, so I'm unsure if I a breaking anything.

from yrv.

pateketrueke avatar pateketrueke commented on September 18, 2024

@jhechtf please rebase again from the master branch, after that you can make ci to run all the tests in your computer, or just wait for github actions to complete. Thank you!

from yrv.

jhechtf avatar jhechtf commented on September 18, 2024

@pateketrueke I rebased the commit some time ago (during thanksgiving break), but as I've said I'm unable to run unit tests in the repository so I cannot attempt to make unit tests to see if my fix does what is intended for this ticket.

from yrv.

pateketrueke avatar pateketrueke commented on September 18, 2024

Really there is no way to run the test suite in your system? I'm intrigued, please share the logs to see what's happening.

from yrv.

jhechtf avatar jhechtf commented on September 18, 2024

Depending on which environment I use,


ERROR Unable to find the browser. "chrome:headless" is not a browser alias or path to an executable file.

Type "testcafe -h" for help.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] test:e2e: `cross-env BASE_URL=http://localhost:3000 testcafe ${BROWSER:-chrome:headless} "-a" "npm run dev" "e2e/cases" "--color"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] test:e2e script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/jhecht/.npm/_logs/2020-12-05T09_03_26_373Z-debug.log
npm ERR! Test failed.  See above for more details.
make: *** [Makefile:9: ci] Error 1

is the farthest it goes. otherwise it stops way before that.

from yrv.

pateketrueke avatar pateketrueke commented on September 18, 2024

So, you don't have Chrome installed? Try another browser instead, e.g. make ci BROWSER=chromium:headless or make ci BROWSER=firefox or make ci BROWSER=safari, etc.

from yrv.

jhechtf avatar jhechtf commented on September 18, 2024

I don't do work on a Linux distribution, so neither of these solutions work for me.

from yrv.

pateketrueke avatar pateketrueke commented on September 18, 2024

Do you have access to Docker?

from yrv.

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.