Open in app
Home
Notifications
Lists
Stories

Write
Gaurav Gupta
Gaurav Gupta

Home

About

Published in smallcase Engineering

·Feb 3

Security: Dependency Confusion with a private npm registry

Disclaimer: We are going to talk about dependency confusion within the context of npm, and specifically with private npm registry, but the attack is applicable for other package managers across other technologies as well Overview When you are installing a dependency, you are essentially trusting the author of the dependency to…

Java Script

4 min read

Security: Dependency Confusion with a private npm registry
Security: Dependency Confusion with a private npm registry

Published in smallcase Engineering

·Dec 27, 2021

story-driven development

An overview of how we use storybook to speed up development, improve the design QA process, document the design system and much more. Overview We use storybook for visual documentation of all different UI states of the component. Story driven development, in simple words, means that we use stories early (much…

Storybook

14 min read

story-driven development
story-driven development

Published in smallcase Engineering

·Dec 18, 2021

Gradually migrating to typescript across multiple js codebases with a mid-size team

Disclaimer: This is more like a transcript of a talk that I gave internally at my company, so the language might be abridged at some places. Glossary: If you are not a frontend developer, it might be helpful for you to have an understanding of these terms as these would be…

Typescript

12 min read

Gradually migrating to typescript across multiple js codebases with a mid-size team
Gradually migrating to typescript across multiple js codebases with a mid-size team

Published in smallcase Engineering

·Dec 18, 2021

function components, callback refs, useCallback, a flawed understanding and infinite renders

In this post, I would briefly discuss an edge case that I have recently encountered related to usage of callback refs in function components and some nuances of useCallback dependencies array, which led to infinite re-renders and hence breaking the component. TLDR; ref callback function is called every time its identity…

Java Script

6 min read

function components, callback refs, useCallback, a flawed understanding and infinite renders
function components, callback refs, useCallback, a flawed understanding and infinite renders

Published in smallcase Engineering

·Dec 12, 2021

Using (async) generators for reporting progress

Context In our product, we allow users to login using 3rd party applications that we have integrated with, and for this we have a multi step async login process. the 3rd party redirects to our frontend with a token in the url, the FE extracts that token, makes an async api…

Java Script

5 min read

Using (async) generators for reporting progress
Using (async) generators for reporting progress

Published in smallcase Engineering

·Aug 6, 2021

Automating templated file / folder structure creation in vscode

Automating a repetitive folder / file structure using a vscode extension Introduction We have a shared component library, which houses our reusable generic components as well as reusable business components. Creating reusable components to be used across multiple products is one major part of our day to day workflow. We have…

Vscode

4 min read

Automating templated file / folder structure creation in vscode
Automating templated file / folder structure creation in vscode

Published in smallcase Engineering

·Jul 30, 2021

Understanding api calls in React functional components and related caveats

Easy to miss details in state management when consuming apis in React functional components, and some patterns to solve the issues encountered We have a complex react codebase, and we end up using a lot of different react patterns due to the underlying complexity of the product and the data…

Java Script

5 min read

Understanding api calls in React functional components and related caveats
Understanding api calls in React functional components and related caveats

Published in smallcase Engineering

·Jul 24, 2021

Misusing optional chaining

Optional chaining is easy to misuse and can potentially confuse future readers of your code in certain scenarios. The optional chaining operator is a fairly recent addition to the javascript syntax. This operator makes it easier for devs to express chained nullable references in a much concise manner. For example…

Java Script

5 min read

Misusing optional chaining
Misusing optional chaining

Published in smallcase Engineering

·Jul 20, 2021

Using JSDoc to enable intellisense for render props in vscode

strongly typed render props in vscode intellisense without typescript — Setup We have a react codebase where we have many React components with the render props pattern. In this codebase we haven’t enabled typescript (yet), and we generally use prop-types for dynamic type checking. We use vscode for development and take advantage of its intellisense / autocompletion in our dev workflow. About vscode intellisense

React

5 min read

Using jsdoc to enable intellisense for render props in vscode
Using jsdoc to enable intellisense for render props in vscode

Published in smallcase Engineering

·Apr 18, 2021

Web security — exposed .git folder in production

You have a frontend application which gets deployed to production, for millions of people to use. The source code is private, you have your development workflow all sorted out, the build and release process is working fine without any glitches, but one day you get a vulnerability report from a…

Web Security

4 min read

Web security — exposed .git folder in production
Web security — exposed .git folder in production
Gaurav Gupta

Gaurav Gupta

Following
  • Netflix Technology Blog

    Netflix Technology Blog

  • Jose Granja

    Jose Granja

  • Akash Hamirwasia

    Akash Hamirwasia

  • Bharat Gupta

    Bharat Gupta

  • Abhay

    Abhay

Help

Status

Writers

Blog

Careers

Privacy

Terms

About

Knowable