Sign in

Passionate Web/App Developer @Amazon, #javascript #reactjs #react-native #ruby #rails #elixir

If you are starting a new app or already have an app but are not sure how to add API layer to your application then this is the right place. I would like to share my experience on how we currently maintain an API layer. (Remember this is not the only way to do it)

I have seen many projects in React where API’s are included in each component and as the application grows it becomes difficult to keep track of all the endpoints that are getting used.

The components might be infected with fetch requests and might look like…

Designed by stories /

We all know how fast the package installation is and the speed at which specs get completed, when the project footprint is small. With time as the codebase grows it starts affecting the following aspects of our project:

  • package installation time
  • linting (11 minutes)
  • code coverage (13 minutes)
  • build (2 minutes)+ asset sync (10 minutes)
  • and at last deployment times (2 minutes)

These areas linked together form a pipeline, to form a continuous delivery also called CD in short.

Now the question arises “what is CI (continuous integration)”?. It can be defined as the process that kicks off the…

Designed by brgfx /

In the previous blog we talked about: Caching in CI

In almost all the projects we have assets which need to be pushed to the cloud which then can be served by a CDN. Serving via CDN not only takes the load away from your web server but also provides various caching options which can improve the asset delivery process.

The Problem

Earlier we used to upload assets just before deploying our JS application. …

Designed by / Freepik

Over past years I have worked in Ruby on Rails (RoR) projects and Node based projects. There were a few things which I really liked about RoR.

One feature which I really liked was an auto check done by RoR while starting rails server. For example, if a developer had added a new gem in the project and another developer would pull the code and try to start the rails server, it would immediately fail will asking to install the latest gems by executing bundle install.

I found this behaviour missing in a node-based project, so I decided to add…

Normally any package can be installed using the following command:

yarn install @<scope>/<package>@1.2.3


npm add @<scope>/<package>@1.2.3

But in case of private Github NPM packages, the setup is slightly different. If one would try installing a private Github NPM package, it would result in 401.

Also if you were getting integrity doesn’t match error for a private repository, its mostly because of using yarn 1.12.3.

computed integrity doesn't match our records, got "sha512-z4PhNX7vuL3xVChQ1m2AB9Yg5AULVxXcg/SpIdNs6c5H0NE8XYXysP+DGNKHfuwvY7kxvUdBeoGlODJ6+SfaPg=="

Just upgrading yarn to a higher version (≥ 1.13.x), the error would now be correctly shown as a 401.

Steps to resolve 401

Using NPM:

  • Create .npmrc file
  • Add the following…

I will be updating this guide frequently as I am currently migrating a project from ex-navigation to react-navigation. You can always refer to this gist to track the changes of this blog.
Please let me know if there are any mistakes or if it could be done in a better way.

Hope this guide helps everyone who ever is planning to migrate or even starting with react-navigation.

react-navigation: 1.5.2 and react-native: 0.45.1

In react-navigation header consists of 3 parts:

1. headerLeft (allows us to specify custom component)
2. headerTitle (the centre portion of the navbar)

React 16 was out sometime back with cool new features like fragments, portals, custom DOM attributes and more. Portals no longer have to be called with this unstable_renderSubtreeIntoContainer, instead its just createPortal now.

This blog will cover on how one can harness the power of portals in older versions of React which had portal as an unstable feature, as I did not find many examples on how to do so.

Till now React only allowed us mount children inside a parent and not anywhere else which made us design the app in a different way, but not anymore as portals…

I have been an active user on StackOverflow and have noticed that many of the developers face difficulties in implementing Rails AJAX. So I thought of creating a demo app and explaining how it works.

At any point in time if you want to refer to the code, here is the link to my git repo.

I will be building a Voting app using act_as_votable gem which is a good way to understand how AJAX works.

We begin by creating an app:

rails new voting_app -d mysql

We need to add our database password in database.yml

I am sure you would have come across the term twitter-bots, it's used by almost everyone to automate tasks like, liking a tweet if your follower tweets by mentioning you in the tweet, retweeting someone’s tweet, following someone who uses a particular term etc.

It’s another important use case is fetching tweets from twitter to do sentiment analysis or to understand the current trend in twitter.

So I thought it will be good to write a tutorial on how we can make a bot using Ruby ( Ofcourse as I am a Ruby developer :) ).

Start building this bot…

Sahil Prajapati

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store