I'm new to React and would really appreciate advice on writing more semantic React. Some specific areas I'm interested in:
- use of state vs props
- mounting
- component organization
- static methods
Things I'm not interested to get feedback on:
- general JS style
- ES6, unless it directly affects React
- markup semantics
I wrote a React app to adjust the serving size of a recipe. For example, if the recipe serves 4 people and requires 4 eggs, scaling it down to serve only 1 person should only require 1 egg. I try to also keep the units singular/plural accordingly while converting units when they become too big or too small. These features are written in plain JS, but I'd be curious to hear if it would be more appropriate to do this in React and how.
Demo: https://rviscomi.github.io/scale-recipe-react/
Source: https://github.com/rviscomi/scale-recipe-react
Demo: https://rviscomi.github.io/scale-recipe-react/
Source: https://github.com/rviscomi/scale-recipe-react
I'm new to React and would really appreciate advice on writing more semantic React. Some specific areas I'm interested in:
- use of state vs props
- mounting
- component organization
- static methods
Things I'm not interested to get feedback on:
- general JS style
- ES6, unless it directly affects React
- markup semantics