Skip to content

Instantly share code, notes, and snippets.

View prprabhu-ms's full-sized avatar

Prathmesh Prabhu prprabhu-ms

  • Microsoft Corporation
View GitHub Profile
@prprabhu-ms
prprabhu-ms / HowToHotFix.md
Last active August 11, 2022 06:54
Notes for creating a hotfix branch: patch the latest stable release
@prprabhu-ms
prprabhu-ms / README.md
Last active July 25, 2022 09:13
Device Permission Update requires a page refresh

Repro steps:

  • Load any web page.
  • Enable/disable device permissions
  • Browser shows a notification that a page refresh is needed.

NeedsPageRefresh

@prprabhu-ms
prprabhu-ms / react-async-callbacks-considered-harmful.md
Last active January 19, 2023 21:12
TIL: Don't expose async callback props in React

It's fairly common practice to expose callback props in React components. There are several reasons you might use callback props:

  1. Notifying ancestors of some condition
  2. Providing a way to render a surface inside your component, the so called render props.
  3. A special case of render props is where the ancestor provides data that then feeds into what gets rendered.

My example builds on the last use-case. Consider the following hello world component:

interface HelloWorldProps {