Create a global "reactive" variable

Hello everyone, I want to have a global variable which is available both on client side components as well as server side components. Is this possible? My variable stores translations. I want to avoid passing them down as props but I can't figure out a way to make them available in every component. It's important that the value gets initialized on the server, because I read the data by using the file system. Also I'd like to be able to change the variable and with it all components using the variable should get updated. Thanks in advance!
4 Replies
cje
cje16mo ago
You’re describing websockets
marian
marian16mo ago
I mean the language and with it the loaded translations don't update often. so I think that would be overkill. Also this wouldn't solve the problem of me having to pass down a variable.
marian
marian16mo ago
Same here, I would have to pass down the params... Is there nothing i can do about it? Nobody?
Want results from more Discord servers?
Add your server