Cleaning up imports
Hãy xem xét một ví dụ:
import Module from '../../../Module'
Giờ có thể được đơn giản hóa thành như sau:
import Module from 'components/Module'
import Module from '@components/Module'
import { Module } from '@components'
CÀI ĐẶT
Cài đặt thư viện:yarn add --dev babel-plugin-module-resolver
Cấu hình
Sau khi cài đặt plugin, chúng ta cần cập nhật babel.config.js (bạn cũng có thể sử dụng .babelrc) và thêm 'module-Resolutionver' vào danh...
Cách cài đặt react native
2678