Concepts that you should definitely know before learning React
If you don't know the following concepts, you will really struggle to understand React.
- Loops (e.g. while, for)
- Mathematical (e.g. +, -) and logical operators (e.g. >, <, ===)
- Conditional branching (e.g. if, ? operator)
- Functions (including arrow functions)
Data structure basics
- Strings and string methods (e.g. indexOf, slice, substr)
- Objects and object methods (e.g. Object.keys, Object.entries)
- Arrays and array methods (e.g. map, reduce, find, sort, push, unshift, includes)
Modules (e.g. import, export)
Concepts that you need to know but could skip for a while
You might be able to start with React without these concepts but not knowing them will limit what you can do.
Promises and asynchronous programming (i.e. async / await)
- Websites built with React usually need to download data from a server. The most basic way* to do this is with the Fetch API which uses Promises and so you need to know how to work with them. Other data fetching methods tend to be asynchronous as well.
- Most React components created nowadays are Function components. But before React hooks were introduced, most components were Class components. While you could avoid writing Class components now with by using React hooks, older React codebases still have many Class components.
*Perhaps the most basic way of doing data fetching is with the older XMLHttpRequest API but it is more cumbersome and the Fetch API is more commonly used