3 ms·
React Hooks for Beginners
- NotAnOtter 5y agoThe site UI is superb but the content is lacking. React Hooks are pretty basic (and the article even targets "beginners"), so the example content should not be ~40 lines. A simple fully functional component with some state change can be represented in like 5-10 lines, no need to over complicate it by including the ReactDOM or parent components like in the example
- adursun 5y agoThank you for your suggestions! Instead of sharing just hook signatures, we wanted to demonstrate scenarios with full code samples. As a result, the readers can see code changes over time. For example, `useEffect` to `useMemo` change, `useEffect` dependency change and extracting a custom hook. If you have any suggestions, I would love to chat with you. (https://twitter.com/crudfulcom https://twitter.com/crudfulcom)