How do I know that the code I write is the right way to do things?
CodePudding user response:
Disclaimer: I'm not a React developer
As with most problems there is usually more than one way to get the code to work. However, there are many practices and patterns that we try to adhere to to make our work easier.
There are often idiomatic ways to do things in specific situations, these may depend on the language or framework that is in use. There are also many conventions in use, such as what casing to use when naming variables, functions, classes, etc.. This is something that you will learn through experience and discussions with your peers.
If you would like somebody to review your code, go and take a look at Code Review.
CodePudding user response:
If you work in a company, usually senior developers will tell you what is wrong and how to write code properly. But if you are at the beginning of your career and are looking for a job, I would recommend books about good practices and design patterns. Also you can learn a lot from React docs.