Coder Social home page Coder Social logo

Comments (5)

andrew-bierman avatar andrew-bierman commented on June 11, 2024

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.

from packrat.

andrew-bierman avatar andrew-bierman commented on June 11, 2024

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.

from packrat.

ovezovv avatar ovezovv commented on June 11, 2024

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.

@andrew-bierman
I can suggest using recoil JS, if you want I can create some basic setup and fire up PR with that which you can look at it.

from packrat.

taronaleksanian avatar taronaleksanian commented on June 11, 2024

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.

I started refactoring of search input, but I ended up to find solution for this. I'm using url serach params for stroing global state, it is a good practice I think, it also saves current state when the user reloads the page.
#653

from packrat.

taronaleksanian avatar taronaleksanian commented on June 11, 2024

However I think it's not a solution for all the cases, I'm still figuring out how to solve i. e. weather object, Obviously using queryString for the complex state is not the best solution,

from packrat.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.