SolidJSS
SolidJS11mo ago
34 replies
hyperknot

Understanding Solid reactivity with console.log

I'm using createMemo with a console.log inside. Can you tell me why is this console.logging all the items, when I click on one?

Am I using createMemo in a wrong way? I thought only the 2 changed items would be recalculated.

I created a Stackblitz + GitHub repo to undestand this better:
https://stackblitz.com/~/github.com/hyperknot/solidjs-sandbox

This is the line with the console.log
https://github.com/hyperknot/solidjs-sandbox/blob/a19b9581595bedd7b5e7949560a7b0d0755b8fd7/src/1-simple/store/doc.js#L15
Was this page helpful?