Skip to content

Instantly share code, notes, and snippets.

View shreyjain1994's full-sized avatar

Shrey Jain shreyjain1994

  • Toronto, Canada
View GitHub Profile
export default function(babel) {
const { types: t } = babel;
return {
name: "test-only-export",
visitor: {
ExportNamedDeclaration(path) {
const lc = path.node.leadingComments;
const cNode = lc && lc[0];
const cValue = cNode && cNode.value;
@shreyjain1994
shreyjain1994 / react-primitives.md
Last active May 9, 2018 13:36
react-primitives

Intro

  • way to write react components that are compatible across web and native
  • exports 6 prewritten components which will output the correct web/native components

Setup

npm install --save react-primitives
@shreyjain1994
shreyjain1994 / storybook.md
Last active May 9, 2018 12:41
storybook.js

Intro

  • Component explorer
  • Write stories to display components at a particular state
  • works with react, vue and angular projects
  • stories are very similar to test cases

Requirements

  • React, vue, or angular project
@shreyjain1994
shreyjain1994 / react-router-v4.md
Last active April 10, 2018 02:03
Javascript Cheatsheets

Intro

Unlike previous versions, almost everything in this version of react-router are components that you use just like everything else in React.

Quick Start

import { Route, Link, BrowserRouter } from 'react-router-dom'