top | item 34189991

(no title)

fernandorojo | 3 years ago

What do you mean? Tamagui is only concerned with UI. Data and state management live in the react world using hooks.

discuss

order

nickreese|3 years ago

Haha. Pardon the naivety. Have lived in the Svelte world too long. Hooks had just come out last time I used react. I’ll get to reading.

fernandorojo|3 years ago

Ah, makes sense.

Tamagui basically solves the part of styling + rendering UI. It works on both web and native.

As for logic/data fetching...this has gotten far, far better in React over the past few years.

For data fetching, assuming you're using REST, @tanstack/react-query is incredible. It gives you a "hook" to wrap any async function, and returns loading states, errors, etc.

In the past, people used Redux, but it's out of fashion now. I prefer a library called zustand whenever I need non-data related global state management.