You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
React web apps don't use the .web.tsx pattern. However, all native apps do use platform extensions.
I'd propose changing MarkdownTextInput.tsx to have the web code, and MarkdownTextInput.tsx to have the React Native code. This way, Web developers don't need additional config to install the library.
I'm happy to do this in a PR if you'd merge it.
Reacted by Tomasz Zawadzki, Guillem Puche and javascripter
Further: we should remove the usage of StyleSheet.create in the web file. Creating the style, and then subsequently flattening it, is unnecessarily expensive with React Native Web. It's better to just use an object and pass it to a flat style prop.
This would also remove the dependency on react-native-web, making this far easier for Web developers to consume.
I've maintained so many RNW libraries, and I encourage you to avoid the headache of using it under the hood unless it's actually necessary
@nandorojo Thanks for opening this issue. We're definitely open to such contribution, feel free to submit a PR.
Just one more thing – let's introduce .native.tsx suffix and remove .web.tsx suffix in one PR and then remove the usage of StyleSheet in another PR so we can keep the changes atomic.
Just one more thing – let's introduce .native.tsx suffix and remove .web.tsx suffix in one PR and then remove the usage of StyleSheet in another PR so we can keep the changes atomic.
Activity
nandorojo commentedon Dec 11, 2024
Further: we should remove the usage of StyleSheet.create in the web file. Creating the style, and then subsequently flattening it, is unnecessarily expensive with React Native Web. It's better to just use an object and pass it to a flat style prop.
This would also remove the dependency on
react-native-web, making this far easier for Web developers to consume.I've maintained so many RNW libraries, and I encourage you to avoid the headache of using it under the hood unless it's actually necessary
tomekzaw commentedon Dec 11, 2024
@nandorojo Thanks for opening this issue. We're definitely open to such contribution, feel free to submit a PR.
Just one more thing – let's introduce
.native.tsxsuffix and remove.web.tsxsuffix in one PR and then remove the usage ofStyleSheetin another PR so we can keep the changes atomic.nandorojo commentedon Dec 11, 2024
PR opened here #582
nandorojo commentedon Dec 11, 2024
Damn it, just saw this lol. I'll revert