Closed masoudmanson closed 2 months ago
Thanks so much for adding this, @masoudmanson !
Sorry for just realizing this, but it seems like in this thread, we might be able to mark the exported modules with
"use client"
automagically by doing this in rollup config!And if we ever need to selectively apply "use client" in just some files, there's a plugin for that now too π
OMG nooo π―π±π€£ This is so embarrassing! I should have checked it myself! I thought we actually needed to add the directive on top of every single component π¬ Thank you for digging that up, it really makes a huge difference π₯³ππ€© I'll leave this PR here and create a new one with the rollup changes.
Thanks so much for adding this, @masoudmanson ! Sorry for just realizing this, but it seems like in this thread, we might be able to mark the exported modules with
"use client"
automagically by doing this in rollup config! rollup/rollup#4699 (comment) And if we ever need to selectively apply "use client" in just some files, there's a plugin for that now too π rollup/rollup#4699 (comment)OMG nooo π―π±π€£ This is so embarrassing! I should have checked it myself! I thought we actually needed to add the directive on top of every single component π¬ Thank you for digging that up, it really makes a huge difference π₯³ππ€© I'll leave this PR here and create a new one with the rollup changes.
Ahaha I thought we had to manually add it ourselves too, so I probably misled you π π€¦ !! Thanks so much for creating a new PR!! π
Summary
All SDS Components Github issue: #814
We nee to add "use client"; in all SDS component files, so projects donβt have to do that manually themselves like here: https://github.com/czbiohub-sf/CZBSF-Metadata-Tracker-refactor/pull/82#discussion_r1684929746