export { width as responsiveHeight } from "react-native-responsive-dimensions";
我想导出名称为 width
的 responsiveHeight
。执行此操作的正确方法是什么?因为这不起作用。
最佳答案
你的语法是相反的。您想要将 responsiveHeight
获取为 width
。
试试这个
export { responsiveHeight as width } from "react-native-responsive-dimensions";
关于javascript - 在 React Native 中导出方法/函数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50902917/