(no title)
fernandorojo | 3 years ago
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.
acemarke|3 years ago
We also get a lot of very positive feedback on our modern Redux Toolkit package, which we designed to simplify Redux usage [1], and it includes our "RTK Query" data fetching and caching API as well [2], which is similar to React Query in use case and API.
[0] https://blog.isquaredsoftware.com/2022/07/npm-package-market...
[1] https://redux.js.org/tutorials/essentials/part-2-app-structu...
[2] https://redux-toolkit.js.org/rtk-query/overview
gnomewrecker|3 years ago
Probably the mentioned hooks-based approaches are indeed fashionable now. Remains to be seen whether they’ll stick around.
karaokeyoga|3 years ago
jsherrard|3 years ago
= Ridiculously high percentage of code re-use across web and react-native apps.
What a time to be alive!
bboygravity|3 years ago
michaelcampbell|3 years ago
theanirudh|3 years ago
redbar0n|3 years ago
The official «Tamagui + Solito + Next + Expo Monorepo» starter:
https://github.com/tamagui/tamagui/tree/master/starters/next...
Or the more recent version that builds on that and adds tRPC and authentication (with Clerk):
create-universal-app - https://github.com/chen-rn/CUA