ant-design-mobile-rn | Ant Design for React Native | Mobile library
kandi X-RAY | ant-design-mobile-rn Summary
kandi X-RAY | ant-design-mobile-rn Summary
A configurable Mobile UI specification and React-based implementation. If you only care about the style you may give [Tanjun] a try.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of ant-design-mobile-rn
ant-design-mobile-rn Key Features
ant-design-mobile-rn Examples and Code Snippets
Community Discussions
Trending Discussions on ant-design-mobile-rn
QUESTION
I'm trying to customize theme in Ant Design Mobile React-Native. I'm using Expo-cli.
I tried to fork https://github.com/ant-design/ant-design-mobile-rn
and customized the theme variables in https://github.com/ant-design/ant-design-mobile-rn/blob/master/components/style/themes/default.tsx,
but when i install the forked repo and use import {Button} from '@ant-design/react-native/lib/button'
, it result to error "Unable to resolve @ant-design/react-native/lib".
Then I rename the folder "components" to "lib" and remove the /lib in .gitignore file and reinstall the forked repo. It now works, but i'm not sure what i did is right. Please help me check if it is the correct way to use a forked repo.
...ANSWER
Answered 2019-Nov-02 at 10:06The steps to do what I suggested in my above comment are:
Make sure you have a Github account and you are logged in.
Go to the repo that you wish to fork and click the fork button (see image)
Once the repo has been forked to your Github account you can now make what ever changes that you want. You probably want to clone your copy of the repo to your computer to do this. Though it can be done on Github if the changes are minor.
Once the changes have been made on your repo you need to push those changes so that they are available on your repo.
Now that your changes are available on the repo, you can use them in your project. To do that you need to remove the previous installation of the repo (if it was there) and then install your forked version.
You install it using the following format npm install --save username/repo#branch-name
I have used this method multiple times when repos that I require haven't been updated and have needed significant upgrades to get them working with new versions of RN.
I also usually look to make a pull request with my changes, especially if what I have done will benefit other users.
When testing you may wish to use your local copy of your repo rather than the one stored on Github. This SO answer, shows how to do that.
Basically in your dependencies section of your package.json
add the path to your local copy of the repo with the appropriate name.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install ant-design-mobile-rn
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page