Hacker News new | ask | show | jobs
by Insensitivity 199 days ago
I'm not sure if React Native is much different from React itself, but a few things that made me give a side eye, when looking at this write up:

1. The instant 5 levels of providers (and additional one later) seems excessive.

2. The usage of useAnimatedReaction which seems almost like a "useEffect" kind of hook, which was sprinkled in almost every code block.

3. The imperative size calculations, does React Native not support any responsive like constructs? I recall solving the same problem by separating "history" and "tail" and having a "grower" component, without having to use any JS (purely html & css), albeit it being web and not native.

4. Personally, when I see something like the scroll code, where you have to call scroll, wait a frame, call scroll again, set a timeout, scroll again- I would have raised my eyebrows about the architecture / code flow way before that.

5. the amount of "floating" hook calls like useKeyboardAwareMessageList() useScrollMessageListFromComposerSizeUpdates() useUpdateLastMessageIndex()

that don't return anything, always makes me raise an eyebrow, usually in React Web codebases, where the users just spam useEffects and effect chains.

Not sure if it's just my ignorance in React Native, but if I had seen the equivalent in a React Web app, I would've been baffled