DEV Community

Discussion on: What is the best way to manage the messages shown to users?

Collapse
joaomarcos160 profile image
João Marcos Author

Thanks, but I meant the messages themselves, for example, I could put them all in a messages.json and it would be something like this:

{
     success: "Success!",
     fail: "Something went wrong",
     create_success: "Created successfully"
}
Enter fullscreen mode Exit fullscreen mode

But I don't know if making this file is a good practice, or leaving everything hard code is good, but thanks anyway :)