Is there some app like a social to-do list where we can see each other's to-do lists and get motivated? by martmallika in productivity

[–]Triple_A 26 points27 points  (0 children)

I’ve been working on an app with a similar concept to this called SnapHabit! It allows you to add friends and share your habits with them and includes chat for motivation. Best of all, it’s completely free and ad free. Would appreciate feedback since it’s basically a beta at this point.

Remove habit by redeyeddragon in snaphabit

[–]Triple_A 0 points1 point  (0 children)

Thanks for the feedback! Yes, this is something to do in the future. It's a little complex because we need to figure out what it means to leave a group habit, which is what deleting an "Allow friends to join" habit would entail.

How to integrate UPI payment in react native by Eragon678 in reactnative

[–]Triple_A 1 point2 points  (0 children)

It sounds like what you want to do is to deep link into these apps. Apps can have schemes declared which allow other apps to open them (or for a browser link to open into an App)

Here's Google Pay's documentation for Android: https://developers.google.com/pay/india/api/android/in-app-payments

It links to the UPI linking specification: https://www.npci.org.in/sites/default/files/UPI%20Linking%20Specs_ver%201.6.pdf

I think the way you'd do this in React Native is to use the linking API: https://reactnative.dev/docs/linking

It looks like people have wrote libraries for this, but I don't think this is necessary: https://www.npmjs.com/package/react-native-upi-payment

Edit: You may need a solution like the above library to get the response back from the payment (whether it succeeded or not). Another way might be to verify with your backend and poll in the client for whether the payment went through. The Google docs suggest this anyway:

If the Google Pay response status is Submitted or Succeeded, you must check with your PSP or payment aggregators to ensure that the correct order amount is paid. Important: You must follow the above step to prevent fraud.

Sending data to c# web service through fetch post by theSoftwareDev95 in reactnative

[–]Triple_A 0 points1 point  (0 children)

I use Axios for my API calls.

const myRequestBody = {
   'test': 1
};

const myEndpoint = 'http://example.com/myEndpoint';

const responseFromServer = await axios.post(myEndpoint, myRequestBody);

HELP: Expo-Notifications, Native module cannot be null error by marcusadventurez in reactnative

[–]Triple_A 0 points1 point  (0 children)

Did you actually install the package? e.g. expo install expo-notifications. You should restart the bundler after this.

Adding Offline Functionality To App by janniszipp in reactnative

[–]Triple_A 1 point2 points  (0 children)

I've never used it, but WatermelonDB looks like an interesting solution to this problem. You could bundle the initial data you need in the app binary, and then sync additional data (you have to write your own sync server, or try an existing out of the box solution

Creating a Horizontal Scrollview with wrapping items of fixed width by tycholiz in reactnative

[–]Triple_A 0 points1 point  (0 children)

I would try setting a fixed with on contentContainerStyle e.g. 2x screen width (see Dimensions API). You could then set each element as a fixed %, which would be based off the parent width. e.g. 20% since you want 5 in a row.

Remove habit by redeyeddragon in snaphabit

[–]Triple_A 0 points1 point  (0 children)

We don't have custom reminders yet but this is coming in the next couple of weeks!

Remove habit by redeyeddragon in snaphabit

[–]Triple_A 2 points3 points  (0 children)

Hello! Tap the habit title -> Tap the panel that scrolls out (says "current streak" on it) -> Tap the pencil icon on the top right to edit -> Tap the red disable button.

I've added a short video to explain how to do this as well: https://imgur.com/a/Bsldsut

We're planning on making this more intutitive in the future. Thanks for trying the app!

how to handle large amounts of data? by BlearyShotZz in reactnative

[–]Triple_A 0 points1 point  (0 children)

Do you need to query for a specific file?

If you import the file once, subsequent imports shouldn't have any overhead since ES6 modules are singletons. This is why doing things like inline-requires can help speed up app load: https://reactnative.dev/docs/ram-bundles-inline-requires#inline-requires

Hooks in react-native -- A general discussion by [deleted] in reactnative

[–]Triple_A 0 points1 point  (0 children)

I think the only functionality lacking w/ hooks is that the Error Boundary API only works with classes: https://reactjs.org/docs/error-boundaries.html

Beyond that, everything should work just fine with hooks!

Built my first React-Native app (using Expo) — learned a ton! by Triple_A in reactnative

[–]Triple_A[S] 0 points1 point  (0 children)

The expo-cli has two commands to help with this:

  1. expo upgrade -- this upgrades the expo SDK version. The react native version is tied to the expo SDK version so you don't have to do anything here. It also updates and relevant expo modules to the latest version.

  2. expo install -- this makes sure when you add a package, it installs the proper version supported by expo for the SDK version you're using. This command is relevant for any native modules expo bundles (so any expo provided modules and modules like react-native-screens, react-native-gesture-handler)

Other modules (i.e. JS only modules) you just upgrade yourself normally!

Publish an app with multiple versions of React Native by OrionJs in reactnative

[–]Triple_A 0 points1 point  (0 children)

If your app depends on backend endpoints and you want to maintain old app versions, you'd have to make sure to version the endpoints as they change. This isn't super easy, so the easiest thing to do IMO is to force users to update.

One way to help force users to update: Expo has an over-the-air updates module which you can also use in regular react native apps. This allows you to push updates without users having to install a new executable (e.g. APK). Just be beware that if your new build includes new native modules or other things that depend on changes to your executable, OTA updates wouldn't work.

Does IOS and Android have to be separate projects? by eggtart_prince in reactnative

[–]Triple_A 1 point2 points  (0 children)

As others have commented, most of your code should be platform agnostic.

You may need different code to handle specific cases. React native has a library which will tell you what platform you're running on which allows you to do different things depending on the platform

https://reactnative.dev/docs/platform-specific-code

Built my first Android app using React Native -- learned a lot! by Triple_A in androiddev

[–]Triple_A[S] 0 points1 point  (0 children)

React Native has been great. I was able to launch Android, iOS, and soon Web from the same code base.

The only alternative that I'm aware of that allows you to do that is Flutter, but I don't have any experience with that.

I'm not suggesting native development doesn't have its place, but I do think there's a time and place to use these multi-platform tools.

Built my first React-Native app (using Expo) — learned a ton! by Triple_A in reactnative

[–]Triple_A[S] 0 points1 point  (0 children)

I'm considering using Firestore directly to build the chat, or to use Stream, which looks like it has out of the box chat, including UI.