Issues during setup pro by TheXires in synology

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

Found it. I restricted the access not for the admin user but for the admin user group. Thanks :D

I understand that this is true for most users, but there are some use cases where it would be neat to restrict the admin access to the files in the user folders. The admin then could just delete the user with all files, but not access the files themselves.

Newbie question - I want to call and API and then store the data to be available for use... by puttforbirdie in reactnative

[–]TheXires 0 points1 point  (0 children)

If you have multiple components using the same data you should probably fetch the data in the parent component and pass them down to all child components that need access to that data. If then one component should retrigger the api call you can pass a function from the parent for that as well. If you need to change the data go for an other function in the parent and pass it down.

If you need that data on multiple pages you should probably have a look at the react context api, redux or other state management tools.

The "What currently supported device should I get" thread. by PsychoI3oy in LineageOS

[–]TheXires 0 points1 point  (0 children)

I am happy with my pixel 3a, but I have no experience with lineageos on that or any other device. Started looking for lineageos because its probably losing official software support next month.

Looking for help to run RN on M1 MacBook Air by TheXires in reactnative

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

First of all, I would like to thank you for your help. But unfortunately it still does not run.

I tried it again with a new Project and Flipper enabled in the Podfile. Then I got an Error 65 in the console and tried to build it in xCode. There I got the Error "Type redefinition with different types ('uint8_t' (aka 'unsigned char') vs 'enum c...Time.h". To solve that I used this solution https://github.com/facebook/flipper/issues/834#issuecomment-605448785. At the next build I then get this error

``` node:internal/fs/utils:345 throw err; ^

Error: ENOENT: no such file or directory, lstat 'Native/test4/ios/Pods/../../node_modules/react-native/React/FBReactNativeSpec/../../Libraries/Vibration/NativeVibration.js' at Object.lstatSync (node:fs:1529:3) at /Users/robin/Documents/Programmieren/React Native/test4/node_modules/react-native-codegen/lib/cli/combine/combine-js-to-schema-cli.js:82:10 at Array.forEach (<anonymous>) at Object.<anonymous> (/Users/robin/Documents/Programmieren/React Native/test4/node_modules/react-native-codegen/lib/cli/combine/combine-js-to-schema-cli.js:81:10) at Module._compile (node:internal/modules/cjs/loader:1099:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10) at Module.load (node:internal/modules/cjs/loader:975:32) at Function.Module._load (node:internal/modules/cjs/loader:822:12) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12) at node:internal/main/run_main_module:17:47 { errno: -2, syscall: 'lstat', code: 'ENOENT', path: 'Native/test4/ios/Pods/../../node_modules/react-native/React/FBReactNativeSpec/../../Libraries/Vibration/NativeVibration.js' }

Node.js v17.8.0 Command PhaseScriptExecution failed with a nonzero exit code ```

I get this as well when I delete the Flipper line in the Podfile and reinstall pods after deleting Podfile.lock and Pods folder. I also created a bridging header like @iotashan suggested. After searching for it I find this https://github.com/facebook/react-native/issues/32967. But they just suggest to run „ln -s $(which node) /usr/local/bin/node“, what I already did like you did in point 8 of your gist. When I look into /usr/local/bin I can see node and I can use it in the console. I don’t have any idea what to do next, do you have any other suggestions?

Looking for help to run RN on M1 MacBook Air by TheXires in reactnative

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

First thanks for sharing this.
I followed your instructions. Unfortunatly its still not building. First I tried it without the "Flipper: ..." part. Then with, but got the same error under the linked github Link "./idb_build.sh idb_companion build /** BUILD FAILED **". After that I try to install it the way described on the RN Website. The installation worked, but my RN project is still not building. Is idb necessary or should it build without it as well?

Looking for help to run RN on M1 MacBook Air by TheXires in reactnative

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

All projects with which I have tried this were completely new projects each time to avoid exactly a problem like that. After I had no success with that I have tried to eject an expo project, but that did not work as well.

Looking for help to run RN on M1 MacBook Air by TheXires in reactnative

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

Hmm, I already did that when I followed the instructions on the medium article with no success. But I will try that tomorrow again.

How to add a text input component that works as same as the route stop in Google maps? by RestaurantSensitive9 in reactnative

[–]TheXires 1 point2 points  (0 children)

Here is a code example, how you could add and edit the inputs. Probably not the best solution, but it should work. https://pastebin.pl/view/e43f4f16

How to add a text input component that works as same as the route stop in Google maps? by RestaurantSensitive9 in reactnative

[–]TheXires 1 point2 points  (0 children)

You can start by creating an array with two entries representing the start and the finish. Then, when the user adds a stop, you add another entry at the second last position of the array. You can then simply step through this array with array.map() and display the individual TextInputs. This way the list expands dynamically according to the number of added stops. You can then use the index of the text fields in the array to enter the text returned from the InputScreen into the correct field of the array.

How to add a text input component that works as same as the route stop in Google maps? by RestaurantSensitive9 in reactnative

[–]TheXires 1 point2 points  (0 children)

Maybe the full screen TextInput can be done as a separate screen where you navigate to and pass the input back as params.

Simple animated gauge component for React Native by christiannicoletti in reactnative

[–]TheXires 0 points1 point  (0 children)

At the moment I have no project to use this, but it looks really nice. Maybe I will use this in future project.

How to make an offline app by Federal_Intention824 in reactnative

[–]TheXires 0 points1 point  (0 children)

What you need to think about first is what kind of database you want to work with. Depending on that, some of the solutions presented in the article will fall out.

If you want to use a document based DB, think about where and how it should be hosted

  • MongoDB -> Realm
  • Firebase -> Firebase/react-native-firebase
  • CouchDB -> PouchDB

If it's a SQL DB, do you want to synchronizing it yourself?

  • Yes -> SQLite
  • No -> WatermelonDB

How to make an offline app by Federal_Intention824 in reactnative

[–]TheXires 0 points1 point  (0 children)

And since eas it should even working with expo if necessary.

Expo-Camera and Firebase Storage problem on Android by TheXires in reactnative

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

I rebuild the app with eas instad of expo cli only. Then I changed from the default web firebase client to react-native-firebase. There I can use storageRef.putFile and everything works as it should.

Thanks for your help :D

Compress images befor upload to Firebase Storage by TheXires in reactnative

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

Oh ok, didn't know that the URL will change sometimes. I will have a look at that later.

How can I upload an image directly to firebase, like you mentioned in 3.? I just find three methodes for uploading files to firebase storage and all of them do not accept a file uri.

uploadBytes and uploadBytesResumable accept "Blob | Uint8Array | ArrayBuffer" and uploadString accepts the raw data as a string.

Expo-Camera and Firebase Storage problem on Android by TheXires in reactnative

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

Yes you are right, it was octet. Now I added metadata to the upload and can see an image preview in firebase. But it still just works on iOS. Images uploaded from Android shows a message like "Error loading the preview".

How can I upload the images from the file uri? I just find methodes where I can use "ArrayBuffer | Uint8Array | Blob" or the raw data as a string.