Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/experimenting with trpc query #392

Merged
merged 118 commits into from
Dec 23, 2023

Conversation

andrew-bierman
Copy link
Owner

@andrew-bierman andrew-bierman commented Sep 26, 2023

All things from redux store that need to be moved over

  • auth: authReducer, // IGNORE FOR NOW
  • dropdown: dropdownReducer, // DOES NOT NEED TO BE MIGRATED
  • search: searchReducer, // DOES NOT NEED TO BE MIGRATED
  • weather: weatherReducer,
  • parks: parksReducer,
  • items: itemsReducer,
  • packs: packsReducer,
  • trips: tripsReducer,
  • favorites: favoritesReducer,
  • singlePack: singlePackReducer,
  • singleTrip: singleTripReducer,
  • feed: feedReducer,
  • gpx: gpxReducer,
  • destination: destinationReducer,
  • chat: chatReducer,
  • globalItems,
  • userStore,
  • offlineQueue, // HANDLE DIRECT WITH REACT QUERY
  • progress: progressReducer, // ignore
  • trails : trailsReducer

Reference this for create, edit, delete actions - https://www.whitespectre.com/ideas/how-to-build-offline-first-react-native-apps-with-react-query-and-typescript/

@render
Copy link

render bot commented Sep 26, 2023

@render
Copy link

render bot commented Sep 26, 2023

Your Render PR Server at https://packrat-dev-pr-392.onrender.com is now live!

View it on your dashboard at https://dashboard.render.com/web/srv-ck94anpehpqs73dpdvvg.

@render
Copy link

render bot commented Sep 28, 2023

Your Render PR Server at https://packrat-dev-pr-392.onrender.com is now live!

View it on your dashboard at https://dashboard.render.com/web/srv-ck94anpehpqs73dpdvvg.

@andrew-bierman andrew-bierman force-pushed the feat/experimenting-with-trpc-query branch from f2003de to f8496d1 Compare October 3, 2023 01:40
@andrew-bierman
Copy link
Owner Author

Adding items to a pack via the /trips screen is broken. It works from the standard pack details screen. Also packs are appearing empty in the /trips screen and not showing their items.

@andrew-bierman
Copy link
Owner Author

#512 (comment)

@andrew-bierman
Copy link
Owner Author

We need to figure out our state management solution for something like create trip. How should we pass around the data for this? I'm open to pass around state props if we can avoid drilling too deep.

We have some stuff in redux still (ie weather state, search state (photon)), but i think we could probably optimize this. Maybe we move state logic and mutations to more defined redux slices (ie set weather object into the createTrip redux store. So all async stuff would go through trpc query but for some of these more complex forms we use redux? But I think we could also probably accomplish a lot of this with just useState also.

Or custom hook with useState could solve too honestly.

Comment on lines +33 to +36
let conversation = await Conversation.findOne({
userId,
_id: conversationId,
});

Check failure

Code scanning / CodeQL

Database query built from user-controlled sources High

This query object depends on a
user-provided value
.
@andrew-bierman andrew-bierman merged commit 5630e53 into andrew_testing Dec 23, 2023
15 of 20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants