React App user settings

Where/how should one store a user’s preferences in a React app? For example, remembering the user’s choice to use a dark theme, or show text in a certain language. Should that sort of thing be stored with the user in the database? Or in a config file for the application itself?

Neither: store the preference as a variable in a component at the top level of the app (for example in a Context Provider component), and provide a toggle button or whatever to change it. And save that in a cookie if you want the preference to persist when the user revisits the app.