Using customised package from GitHub in React Native

Rushabh Gedam
2 min readNov 10, 2022

--

Almost of react native developers are definitely using packages to enhance the experience of End User. Along with that we always try to solve problems with the help of existing package, due to which we don’t wanna code amount of code on our own.

Now sometimes it happens that you’re having a package completely but in some styling or some props or something we need to modify & use that package.

This works pretty cool when you’re an individual, but while working on team of developer’s definitely it’s the heaviest task to tell them to edit or modify some specific styleor specific propsor anything.

Not worked out in team

Please go to line number 868 & update the value of width from 900 to 100%.

or

Please go to interface of props & update the onChange to optional.

I also won’t prefer to go with that, so now coming to the solution

  1. Upload your modified package to github.
  2. Now remember your github profile name & repository name.
  3. Customise the string as github:<github user name>/<github repository name>
  4. Definitely while adding package you’re following steps as yarn add github:rushabhgedam/fireChat
  5. Now the only thing remained is refresh your node_modules by deleting & reinstalling npm packages. (skip if everything works well)
  6. Either use yarn or use npm install

Verify your package.json in case if required.

Now chill & smile

Now you’re having modified package on your gihub repository & you’re installing a package that is modified by you.

--

--