QwikDev / qwik

Instant-loading web apps, without effort
https://qwik.dev
MIT License
20.64k stars 1.29k forks source link

[🐞] Context gets removed too eagerly #5411

Open wmertens opened 10 months ago

wmertens commented 10 months ago

Which component is affected?

Qwik Runtime

Describe the bug

When an app doesn't use context during SSR but uses it after resume, the context is not available

Reproduction

https://qwik.builder.io/playground/#v=1.2.17&f=Q0o0JhbG8IgCyiMSgA6QB6%2BBYRxQHQxioyVDqDSUj8qDpV0dLmicKaHHsRIXFyS8kksqgMGFnsSBFZadhlKykiZMWRCw7AUqw5ZUkbIP0DBNpCAHN2gyMiENGk1gyiUu7WPJg0CDdRSqgQaAQgvclAHXIraI0NKIjkW2GhL8IHvhcQZuTCHaENUQCzXAJukBy5jSVNtog1jNWjvnosTiDHjrC6q%2FGkmdHrDZAXUvMOWWA%2BNesxYa31AbwZ4dzaVDL5cCAA

Steps to reproduce

Click the "crash" button. You'll see that the $context$ for the parent has not been filled in.

System Info

see playground, it crashes in all versions of qwik (for 1.1.5 you'll have to switch to production build)

Additional Information

No response

wmertens commented 10 months ago

Workaround: add a useContext after the provider

PatrickJS commented 4 months ago

is this still an issue in v2?