Coding style can be nearly religious, but in the JavaScript and React world, some standards are very common. AirBNB has one good, fairly well–regarded style guide at: http://bit.ly/JStyle.
For React VR, some style options to consider are as follows:
- Use lowercase for the first letter of a variable name. In other words, this.props.currentX, not this.props.CurrentX, and don't use underscores (this is called camelCase).
- Use PascalCase only when naming constructors or classes.
- As you're using PascalCase for files, make the filename match the class, so
import MyClass from './MyClass'.
- Be careful about 0 vs {0}. In general, learn JavaScript and React.
- Always use const or let to declare variables to avoid polluting the ...