Replies: 1 comment
-
@KeitelDOG how did you get RNP running with NextJS? I receive after install
as an error |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm using React Native + NextJS with React-Native-Web to generate HTML. I'm also using RN Paper, everything works great, but on my chunks, it's really heavy because some packages are imported as a whole.
With Material-UI, I used to benefit from tree-shaking with core import like:
import Button from '@material-ui/core/Button';
Is there any similar way to do this in RNP? My current import looks like:
import { Button } from 'react-native-paper';
Even with few Components, it's putting the all RNP Components in the
_app-xxxxx.js
chunk.EDIT
I have found that this import works :
import Title from 'react-native-paper/lib/commonjs/components/Typography/Title';
But I don't know if this will even shake the tree if I do this in all files.
Beta Was this translation helpful? Give feedback.
All reactions