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

useOnyx type improvements #534

Closed fabioh8010 closed 4 months ago

fabioh8010 commented 5 months ago

Details

This PR does the following changes:

⚠️ Follow-up PR on E/App when these changes are available there: https://github.com/Expensify/App/pull/40367

⚠️ Playground branch: https://github.com/fabioh8010/expensify-app/tree/feature/playground-use-onyx

Related Issues

$ https://github.com/Expensify/App/issues/34339

Automated Tests

Manual Tests

Some common tasks on E/App:

  1. Start a new chat and search for someone (uses useOnyx).
  2. Send a message to someone.
  3. Open someone's profile and change settings (uses useOnyx).
  4. Open Preferences and change settings (uses useOnyx).

Author Checklist

Screenshots/Videos

Android: Native I'm having issue to build Android app.
Android: mWeb Chrome https://github.com/Expensify/react-native-onyx/assets/20051562/b6c57db7-c4f2-42fb-ac4c-88d14ed10b29
iOS: Native It's failing runtime due to changes on this repo's `main`. ![Simulator Screenshot - iPhone 15 Pro Max - 2024-04-26 at 15 52 16](https://github.com/Expensify/react-native-onyx/assets/20051562/6f7857de-37bf-4e20-ae53-af5aa99f7d50)
iOS: mWeb Safari https://github.com/Expensify/react-native-onyx/assets/20051562/f8f779c4-7c7e-4589-8925-cd342327e6d9
MacOS: Chrome / Safari https://github.com/Expensify/react-native-onyx/assets/20051562/97460201-260d-42aa-aebc-1a78f5f931bf https://github.com/Expensify/react-native-onyx/assets/20051562/7b8aadf1-11fc-47f4-8b43-798541542887
MacOS: Desktop https://github.com/Expensify/react-native-onyx/assets/20051562/d67d7f58-a492-42cc-8258-4f7144757aa9
fabioh8010 commented 5 months ago

@roryabraham @blazejkustra I've also upgraded both Onyx and E/App TS to 5.4.5 to be able to use NoInfer type, necessary to fix initialValue issues with TS.

fabioh8010 commented 4 months ago

Putting this on HOLD because I'm going to be OOO next week, and will return on May 6th.

fabioh8010 commented 4 months ago

@roryabraham @techievivek I'm taking this PR off the hold.

github-actions[bot] commented 4 months ago

🚀Published to npm in v2.0.37