Expensify / react-native-onyx

Persistent, offline-first state management solution for React Native. Easy to use with minimal config and boilerplate.
MIT License
151 stars 71 forks source link

Update docs to promote useOnyx usage over withOnyx #557

Closed ikevin127 closed 3 months ago

ikevin127 commented 3 months ago

Details

Based on this Slack 🧵 discussion, this PR is updating the docs to promote the usage of the useOnyx hook over the withOnyx HOC which is deprecated and should not be used anymore, except if absolutely necessary for example if using React class components where hooks cannot be used.

cc @roryabraham @fabioh8010

Related Issues

GH_LINK

Automated Tests

Manual Tests

Author Checklist

Screenshots/Videos

Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop
github-actions[bot] commented 3 months ago

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

ikevin127 commented 3 months ago

I have read the CLA Document and I hereby sign the CLA

ikevin127 commented 3 months ago

@fabioh8010 I think I addressed all the change requests, and some extra docs UI/UX related things like paragraph spacing for better readability and the markdown deprecation warning template for better notice/visualisation of the deprecated HOC.

Please take a look when you get a chance and let me know if there's anything else you'd do / write differently.

github-actions[bot] commented 3 months ago

🚀Published to npm in v2.0.45