Closed brc-dd closed 5 months ago
Things to consider - https://vuejs.org/guide/scaling-up/ssr#cross-request-state-pollution
https://github.com/globalbrain/sefirot/blob/85752d55a67c381dfd725044af0b579f23d864c5/lib/composables/Tooltip.ts#L11 is also a leak I guess in SSR
Yeah. Leaving that since tooltip will never rendered in SSR with our use cases, but, as a best practice, we should avoid it 👀
This is another reason too, but if some component really has a global state, maybe it would be easier to just use Pinia? 🤔 I mean it is made especially for this purpose (handling global state) so 😳
Yeah Pinia is definitely easy to use. But it's pulling like 20kB, I wanted to avoid that. Client only refs will work fine for both snackbars and tooltips, and most likely we won't ever need server side state 🤷 Idk, let's focus on other stuff and come back to this if it becomes performance bottleneck.
@brc-dd I guess due to Error component, we are going to drop this issue, right? 😳
Only stores/Snackbars.ts uses it. But I don't think it needs it.