How to create constants file like: key - value in ReactJs,
ACTION_INVALID = \"This action is invalid!\"
and to use that in other components
You can simply create an object for your constants:
const myConstClass = { ACTION_INVALID: "This action is invalid!" }
And then use it.
If you are bundling, you can export this object and then import for each component file.
export
import