Day 1 of 30DaysOfReact β
I decided to study and revise the React documentation (from an experienced dev's point of view, staying sharp).
For those that don't work with or know what React is, it is a JavaScript library created and maintained by engineers from Facebook for building user interfaces by composing small, reusable pieces called components.
It's the underlying tech behind Facebook and Instagram, and X/Twitter.
Todayβs React revision notes:
β’ Components are the core unit: reusable UI that keeps markup rendering logic together
β’ Function components need a capital letter and must return JSX
β’ File organisation: split components as they grow; be intentional about exports
1 default export per file, many named exports, imports must match
β’ JSX rules worth rechecking:
-- single root element
-- close every tag, including self-closing like <img />
-- attributes are mostly camelCase (className, strokeWidth)
β’ Curly braces refresher:
-- use {} for JS expressions in text and attribute values after =
-- quoted attributes are strings
-- {{}} is just an object literal inside JSX, not special syntax
Since I am a professional who uses React all the time, I thought it would be great to fill any gaps, and really double down on my knowledge.
Follow along if you're interested, and reach out / connect if you want to chat. π