Update react
I think the react examples could use an update. I was thinking something like this.
Here are the stuff my demo has:
- use context to hold
gunobject - use hooks (
useGun, anduseCallbackin examples, but also any other state/effects needed could go here) - functional components
- modern tooling (I am using vite with swc in my example)
- CI build to github-pages by default
This style can be used for react-native as well as web-react, and makes everything simpler & easier to use.
I am happy to PR anything to modernize it. I noticed docs & examples have old class-components. Is there anywhere else? Where are docs source?
Oh gosh, yes please, with anything like React it seems they change stuff every 6 months so please please please have at it. Basically anything that actually works & is up to date is always a blessing, since I don't use react myself personally but want as wide ecosystem support.
Oh gosh, yes please, with anything like React it seems they change stuff every 6 months
Yes, agreed. I think the API has stabilized a bit, and now it's mostly very small changes. This style of functional + hooks has gained a lot of traction, and I think will be around for a while.
Where do I start?
I feel like these are the main areas, did I miss any?
- main project examples
- tutorial - where is the source for this? I can update the examples, if I know where to PR.
@konsumer sure! https://github.com/amark/gun/wiki/React-Tutorial https://github.com/amark/gun/wiki/React to edit + then PR on the examples/react