Hacker News new | past | comments | ask | show | jobs | submit login
Our Transition to React Native (khanacademy.org)
11 points by bryan_ka 10 months ago | hide | past | favorite | 16 comments



Great post. Wondering why you chose go over js/ts as your backend since it seemed like keeping a light footprint is key for you?


Sorry I didn't see this earlier…

I believe that Go has a lighter footprint (both in memory and CPU) than JavaScript.


Hi! I'm the author of the post, happy to answer any questions you might have!


Hi Bryan. Loved the article! I've been doing React Native for about a year-plus now. One of the things I've struggled with is making Android feel performant. The first render for heavy screens can be noticeably slow. Do you have any practices that you stick to to ensure Android performs well? Thanks!


We've got some SectionList and FlatList components in the app that can get pretty long (e.g. our Unit screen lists out every lesson and content-item in there, that's pretty big.)

We use the initialNumToRender prop to help out with rendering long lists like that - dunno if that's one of your performance bits, but it was a big help to us!


I was briefly on a project which used React Native ~3 years ago. The non-descrpit red error screen was a killer. Has the dev experience for RN improved much since then?


It's gotten much better over the last three years! Like the other reply here said - go take a look at the recent LogBox updates there!


Check out the new error screen (LogBox) in 0.63! https://reactnative.dev/blog/2020/07/06/version-0.63


What do you think about using React Native in web?


I've heard great things about it! Haven't used it myself yet.

We've considered using it for our interactive-exercises code (because it's shared between web and mobile) but haven't made concrete plans yet to make that change. (For now, our interactive exercises are still an embedded webview wrapped in React Native "chrome".)


What do you think of the future of React Native?


It's been a bit since I looked at the overall roadmap, but I've really enjoyed what I've seen and used so far! I've been enjoying Hooks lately, for example.


What did you do to ensure network resilience?


A big feature for our app is that it needs to work in spotty network conditions - especially as we've expanded internationally, and as students are now studying from home where they often don't have WiFi.

We have a redux store where we keep our data, and much of the "have you watched this video" or "have you completed this assignment" data gets persisted to disk, so if a network failure happens we can just try again when the user's device is back on!

(Does that answer your question?)


So nothing like automatic retries/backoff or queue failed requests?


Why moved to reactjs?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: