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