GithubHelp home page GithubHelp logo

Comments (3)

wmertens avatar wmertens commented on June 12, 2024

can you explain exactly what errors you're getting? Also, try updating qwik-ui

from qwik.

Wykks avatar Wykks commented on June 12, 2024

If you open the modal then close it (click or esc key), there's this error (and then the app doesn't work anymore) :

props.stuff is undefined MyStuffModalContent_component_fooSig_useComputed_sBXmoQdQVq

stuff is set to undefined like this :

onClose$={() => {
    stuffSig.value = undefined;
}

But this should not happen, because the modal component should be destroyed before being updated.

The weird part is that when reading stuff like this :

const foo = props.stuff.foo;
return <div>{foo.foo2}</div>;

It doesn't work (props.stuff is undefined on modal close).

But this doesn't throw any errors :

const stuff = props.stuff;
return <div>{stuff.foo.foo2}</div>;

Also the first case const foo = props.stuff.foo; works if directly written in the main modal component.

This is a very short repro, it doesn't seems a big deal, bug with more code and more complicated models this can be hard to debug (at least for me, as I'm still not used to debug Qwik... quickly 😅 )

(Also qwik-ui updated, no changes)

from qwik.

Wykks avatar Wykks commented on June 12, 2024

@PatrickJS Can you elaborate a bit why this is "not planned" ? 😅
I believe this is a important issue in Qwik. Quite easy to workaround, but not that easy to debug. I spent hours to identify the bug and make that reproduction, I could have spend more hours to narrow it more but closing this like that is not motivating...

from qwik.

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.