#Server side constant in React component

1 messages · Page 1 of 1 (latest)

noble notch
#

I have a constants.server.ts which contains an ever growing list of constants like
const SOME_TYPE = { A: 1, B:2, C3 }; etc.

I have a constants.ts as well which contains constants specifically used in React components. But I would like to use a few constants from the constants.server.ts in React components as well while not importing the whole server side file on the client because of the large and growing size. What is the right way to do this? Thanks!!

naive rover
#

Split out the shared ones into their own module