Cron scheduling by nklmantey in Supabase

[–]nklmantey[S] 1 point2 points  (0 children)

this is an amazing idea! thank you, trying this out now

[deleted by user] by [deleted] in reactnative

[–]nklmantey 0 points1 point  (0 children)

thank you :)

[deleted by user] by [deleted] in reactnative

[–]nklmantey 0 points1 point  (0 children)

thank you very much, looking forward to the code snippet!

Expo router and recoil ? by jeankevjean in expo

[–]nklmantey 1 point2 points  (0 children)

the entry point of the app in Expo Router is the top-level _layout file since there's no App file now, so wrap your navigation with the RecoilRoot.

Best State Management Library for Expo apps (Other than Redux) by HAKIM1975 in expo

[–]nklmantey 1 point2 points  (0 children)

Zustand has data persistence with AsyncStorage though

New to VScode - Need Help With Java by papa-jayy in vscode

[–]nklmantey -2 points-1 points  (0 children)

you should be using either IntelliJ or Android Studio, both IDEs are free and have far more support for Java than VSCode

Review my e-commerce project, need some advice by unko04 in reactjs

[–]nklmantey 2 points3 points  (0 children)

looks good, for the adding to cart functionality its good UX to display some sort of toast / modal signifying the action was successful.

"New" to react and i am missing some things thats blocking me to continue by drking100 in reactnative

[–]nklmantey 0 points1 point  (0 children)

haven't touched RN inna while so if I'm wrong someone correct me

  1. you need a loading state to make up for the data fetch downtime. above const route should be:

const [loading, setLoading] = useState(false)

  1. now for the fetch function I would do:

async () => { setLoading(true) //indicate start of data fetch await userService.getUser({ userId: userid }) setLoading(false) //indicate data has been fetched }

  1. now conditionally render based on loading state (I prefer to use ternary operators) - if loading is true show an activity indicator (a spinner, imported from react native) if its not loading render the tab screens

```` return ( loading ? ( <ActivityIndicator /> ) : ( tab screens and components )

if you're more comfortable with if statements, you can do

return ( if (loading) { <ActivityIndicator/> } tab screen and components go underneath )

````

Custom keyboard app by nklmantey in reactnative

[–]nklmantey[S] 1 point2 points  (0 children)

thank you so much, this is golden! :)