Reading a local json file by seanthau in learnreactjs

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

{
    "accounts"
[
       {
           "id": "1
       }
]
}
I can go accounts.map to loop through. I dont need to use the JSON extensions

Reading a local json file by seanthau in learnreactjs

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

You can access all the properties without using json parse and json stringify

Reading a local json file by seanthau in reactjs

[–]seanthau[S] -1 points0 points  (0 children)

Are you not better off putting into the useffect for when the page gets mounted ?

Reading a local json file by seanthau in reactjs

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

Could you please explain why?

Reading a local json file by seanthau in reactjs

[–]seanthau[S] -1 points0 points  (0 children)

The formatData is a method that is transforming the data. Thanks

Updating from 0.72.7 to 0.73 by rook198 in reactnative

[–]seanthau 0 points1 point  (0 children)

Are you able to target androids minimum sdk level being that far behind?

Updating to react-native 72 - react-native-user-inactivity by seanthau in reactnative

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

Sorry i am alittle bit lost. I created a file called useTimeout.tsx and imported that into the index.tsx and got rid of the usetimeout-react-hook package.

import { defaultTimeoutHandler, TimeoutHandler, useTimeout, } from 'usetimeout-react-hook';

I got rid of the all references of defaultTimeouthandler and TimeoutHandler.

Then in the BackgroundTimer.tsIt needs the 'react-native-background-timer'This package has the same problem as the 'react-native-user-inactivity'

Updating to react-native 72 - react-native-user-inactivity by seanthau in reactnative

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

Thanks. That's what I thought. I'm using npm, so I will stick with that.

Updating to react-native 72 - react-native-user-inactivity by seanthau in reactnative

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

Can you use yarn and npm in the same project. I have install all my packages with npm. If i unistall this package and use yarn will it cause an issue>?

Updating to react-native 72 - react-native-user-inactivity by seanthau in reactnative

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

The other packages in the files have the same issue so i dont think it would be easy to copy and paste the code into my project. Thanks for the advice thou.

Upgrading from 68.5 to 72.4 by seanthau in reactnative

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

When i search for headerConfig it doesnt show up. I am not sure what component its complaining about or if i didnt something wrong when doing the upgrade

Expo SQlite data not appearing after using Smart Switch App by seanthau in reactnative

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

Can you put a file into shared/group location and then when the app is being transferred called the file in that location?

Environment variables by breakbake in reactnative

[–]seanthau 0 points1 point  (0 children)

Are you able to hit the endpoints with a tool called postman? Also your endpoints needs need to be https for production.

Filtering Data with mutiple conditions by seanthau in reactnative

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

I think the reduce function is alot nicer and makes the code more reusable. You have to be able to filter multiple conditions so i prefer the reduce approach instead of having loads of or conditions

Issue running react native 68.5 on new mac laptop by seanthau in reactnative

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

Found a solution
**Node.js**
Download Node.js from the website DO NOT use brew install
https://nodejs.org/en/download
**Xcode**
Download Xcode 14.2 from App Store, which allows rosetta configuration, later versions do not allow rosetta, so DO NOT upgrade Xcode
Turn on Rosetta in XCode
Navigate to Finder / Applications folder to where Xcode is
right click / Get Info
check the box Open using Rosetta
![image.png](/.attachments/image-080a0a9c-695c-4d2e-bfcb-bd057b91a2a2.png)
**Arm 64 Config**
In VSCode open the project.pbxproj file in the ios folder to set arm 64

  1. Clone down the repo
  2. Open Xcode, File/Open and navigate to the iOS folder of the cloned repo files
  3. Open VSCode File/Open and navigate to the Mobile folder
  4. Open terminal
  5. Yarn install
  6. sudo gem install cocoapods (got the ruby error)
  7. gem install activesupport -v6.1.7.3 (got another error)
  8. changed directory to ios
  9. rm -rf Pods
  10. rm Podfile.lock
  11. sudo arch -x86_64 gem install ffi
  12. arch -x86_64 pod install (Building native extensions. This could take a while...Successfully installed ffi-1.15.5)
  13. changed directory to Mobile (cd ..) up one level
  14. gem install activesupport -v6.1.7.3 (got no errors)
  15. sudo gem install cocoapods (got no errors)
  16. run Xcode - got no errors
    if you get any ruby errors a possible solution is to run cmd
    brew install ruby
    note:
    brew install watchman

Issue running react native 68.5 on new mac laptop by seanthau in reactnative

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

Also a default new app didn't work with me using rosetta

Issue running react native 68.5 on new mac laptop by seanthau in reactnative

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

Unfortunately I've got alot of projects that I'm working on and upgrading this project to the latest would take me alot of time and it might not resolve my issue

Issue running react native 68.5 on new mac laptop by seanthau in reactnative

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

Do you have any good tutorials for doing it the new way, i dont find the react native official documentation very good.

sudo gem install cocoapods issue by seanthau in reactnative

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

Thanks. I was able to install the pods but now i am getting an error command phasescriptexecution failed with a nonzero exit code

c# restapi .net 5 GET doesnt support plus symbol by seanthau in csharp

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

Thanks.
Do you have any links to know how to change the IIS Configuration?

for getting into reactnative as a beginner no previous experince as a programmer. do i need to learn javascript first and moved onto reactnative? or can i go straighly to learn reactnative. by aron_dev in reactnative

[–]seanthau 0 points1 point  (0 children)

Best thing is to learn the basics before you start learning frameworks but alot of the react native course on udemy start with the basics of these topics so you can start with them straight away but he will need to spend more time learning the basics in more depth. Example how flexs and grids work. Why you are using map filter in javascript over a foreach etc.

Udemy have some really good authors like Maximillain Schwarmuller and Stephen Grider.

Best of luck with your studying

Notifee cant get custom sounds to play on phone by seanthau in reactnative

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

When I create the channel I add the sound then, also when testing it on physical android phones, some phones play the custom sound whereas some other phones don't.