|
|
|
|
|
by ptx
3047 days ago
|
|
Can you make a native button in React Native yet? When I first tried it, there was no button component at all; later, they added a component[1] that emulates (almost correctly) the look and feel of a native button but is not actually native. I tried to implement a native Android button component myself (i.e. hook it up[2] using Java code), but the problem I ran into was that for the button to compute its desired size, React Native wants to do the measurement step on the JS thread, before the actual button is created (so it can't be asked for its size). And the built-in components' implementation of measurement looked really complicated, so I gave up on it. [1] https://facebook.github.io/react-native/docs/button.html [2] https://facebook.github.io/react-native/docs/native-componen... |
|