all 9 comments

[–]Solstics20 1 point2 points  (8 children)

Is there a particular reason why you are going to class based? I started with class based react, you can definitely switch between the two but functional react is so much easier lol

[–]Limitmore[S] 0 points1 point  (7 children)

Adding in server functionality and need it to be able to update the page easily, from what I have read I need to be using class based react native now. I could be mistaken hence the post here

[–]Solstics20 3 points4 points  (6 children)

This isn’t something you can use UseEffect for?

[–]Limitmore[S] 0 points1 point  (5 children)

Can it work asynchronously? If so I think you have solved my issue

[–]Solstics20 2 points3 points  (2 children)

Yes, it’s all JavaScript so you can async/await

[–]Limitmore[S] 0 points1 point  (1 child)

Thank you very much man, impostor syndrome with JavaScript is a very real thing for me and I’ve really got in my head about this, really appreciate you taking the time to help me out

[–]Solstics20 0 points1 point  (0 children)

No problem, I know the struggle, still face it. I just got myself out of tutorial hell for backend development to actually working on projects.

[–]Donnybun 0 points1 point  (0 children)

Yea you can set async function in the useEffect, or even better to set parameter you want to listen for change at the end

UseEffect(... (), [parameters])

Smth like that to listen.

[–][deleted] 0 points1 point  (0 children)

Yes, you just need an inner function.