qwik icon indicating copy to clipboard operation
qwik copied to clipboard

Store based conditional rendering not working with latest qwik starter (0.11.0)

Open Royal-lobster opened this issue 3 years ago • 1 comments

Qwik Version

0.11.0

Operating System (or Browser)

Firefox 105.0.1-1

Node Version (if applicable)

No response

Which component is affected?

Qwik City

Expected Behaviour

  • The store value in conditional statement should evaluate the condition every time it gets updated

Actual Behaviour

  • The change in store value is not reflecting to the conditional statement it is used in and is throwing this error -
QWIK ERROR value must be a primitive 
logError@https://qwik-starter-hc531u--5173.local-corp.webcontainer.io/node_modules/@builder.io/qwik/core.mjs?v=9acb5654:59:54
logErrorAndStop@https://qwik-starter-hc531u--5173.local-corp.webcontainer.io/node_modules/@builder.io/qwik/core.mjs?v=9acb5654:70:25
assertTrue@https://qwik-starter-hc531u--5173.local-corp.webcontainer.io/node_modules/@builder.io/qwik/core.mjs?v=9acb5654:199:15
processData$1@https://qwik-starter-hc531u--5173.local-corp.webcontainer.io/node_modules/@builder.io/qwik/core.mjs?v=9acb5654:2161:19
processNode@https://qwik-starter-hc531u--5173.local-corp.webcontainer.io/node_modules/@builder.io/qwik/core.mjs?v=9acb5654:2129:21
processData$1@https://qwik-starter-hc531u--5173.local-corp.webcontainer.io/node_modules/@builder.io/qwik/core.mjs?v=9acb5654:2156:16
processData$1/output<@https://qwik-starter-hc531u--5173.local-corp.webcontainer.io/node_modules/@builder.io/qwik/core.mjs?v=9acb5654:2167:68
processData$1@https://qwik-starter-hc531u--5173.local-corp.webcontainer.io/node_modules/@builder.io/qwik/core.mjs?v=9acb5654:2167:40
processNode@https://qwik-starter-hc531u--5173.local-corp.webcontainer.io/node_modules/@builder.io/qwik/core.mjs?v=9acb5654:2122:16
processData$1@https://qwik-starter-hc531u--5173.local-corp.webcontainer.io/node_modules/@builder.io/qwik/core.mjs?v=9acb5654:2156:16
renderComponent/<@https://qwik-starter-hc531u--5173.local-corp.webcontainer.io/node_modules/@builder.io/qwik/core.mjs?v=9acb5654:2080:47
log.js:13:16

Additional Information

I am trying to create a simple navbar component and noticed the conditional rendering based on store value is not working, i created a minimal reproduction and tried to check this on repl playground it worked fine but not working with project created freshly with npm create qwik@latest

Reproduction link

  • https://stackblitz.com/edit/qwik-starter-hc531u?file=src%2Froutes%2Findex.tsx

Screenshot

https://user-images.githubusercontent.com/52039218/195919051-d9f7fc6e-dff7-46ad-b4f1-011a9b37c497.mp4

Royal-lobster avatar Oct 14 '22 18:10 Royal-lobster