Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6212

React Navigation: Why doesn't minified file in `lib` directory update when I change corresponding file in `src`?

$
0
0

I'm using Material Top Tab navigator in my React Native app. Specifically, I use the function createMaterialTopTabNavigator() which is found in react-navigation-tabs. react-navigation-tabs contains the file lib -> module -> views -> MaterialTopTabBar.js, which is a minified file corresponding to src -> views -> MaterialTopTabBar.tsx. I wanted to change something in MaterialTopTabBar.tsx because I might fork the module, but when I edited MaterialTopTabBar.tsx, even when I re-ran react-native run-ios, MaterialTopTabBar.js (in lib) didn't get updated. When I edited MaterialTopTabBar.js (the minified file) directly, the changes did show.

Does anyone know why MaterialTopTabBar.js doesn't get updated when I change MaterialTopTabBar.tsx and re-build the project?

UPDATE: I think it's that MaterialTopTabBar.tsx was transpiled to MaterialTopTabBar.js before the module was shipped, rather than when I build the project. One way I was able to solve the problem was to manually convert the Typescript code in MaterialTopTabBar.tsx to JS, and paste it into MaterialTopTabBar.js.


Viewing all articles
Browse latest Browse all 6212

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>