๐ Learning and exploring React https://reactjs.org/.
A JavaScript library for building user interfaces
NOTE: This project was developed on macOS. It is for my own personal use.
This repository illustrates different concepts, patterns and examples via standalone subprojects. Each subproject is completely independent of the others and do not depend on the root project. This standalone subproject constraint forces the subprojects to be complete and maximizes the reader's chances of successfully running, understanding, and re-using the code.
The subprojects include:
An example program that largely ejects from React. Let's use React as a rendering library and not a framework. This demonstrates using React for rendering while managing state and side effects outside of React's hooks system.
See the README in ejected-react/.
Incorporate raw HTML into a React app.
See the README in raw-html/.
A simple example of how to use (and not use) the useEffect React hook.
See the README in use-effect-hook/.
An illustration of the familiar "double fetching" problem that many React program designs are susceptible to.
See the README in double-fetching-problem/.
Example React program using TanStack Query.
See the README in tanstack-query/.
General clean-ups, todos and things I wish to implement for this project:
- DONE (although I'm not pursuing it because it doesn't support SSG) Consider creating a Deno Fresh example project. I like what Deno has accomplished and where it's going, and I was pleasantly surprised to see that Fresh is branded with a 1.x release. I generally am cautious about adopting 0.x software at face value but that's not a hard rule.
 -  DONE Moved toolchain example projects (babel-standalone, vite, webpack, esbuild) to a separate 
react-toolchains-playgroundrepository. This playground now focuses on features of React itself. -  Consider bringing back the core content of 
flat-uibut use React Table or a viable/idiomatic alternative, if it would make a useful reference. -  HOLD (Partially implemented but I'm holding off until I finish a TanStack Query example subproject) "Synchronizing with an external system". These are the words React uses describe the purpose of the 
useEffecthook. I already have an example I like of theuseEffecthook, but it's in terms of misunderstanding the dependencies array and I want an example that's a little different. I'm struggling with the prototypical problem where, because I'm using<React.StrictMode>, and afetchrequest, I'm getting two calls which is just wrong. What's the right way to do this? I know tools like TanStack Query exist to handle this, but I want to implement it from React primitives (not that React/JavaScript is primitive at all). I've tried and failed to implement auseFetchhook in another project and that was too ambitious. So I want maybe aquerysubproject (and also I probably want a TanStack Query subproject for comparison and because that is a nice tool). -  DONE TanStack Query example very similar to the 
querysubproject. - React Server Components