Skip to content

Instantly share code, notes, and snippets.

View vigneshwaran-chandrasekaran's full-sized avatar
👨‍🎓
Focusing

Vigneshwaran Chandrasekaran vigneshwaran-chandrasekaran

👨‍🎓
Focusing
View GitHub Profile

MongoDB Cheat Sheet

Show All Databases

show dbs

Show Current Database

@imedadel
imedadel / index.js
Created May 26, 2019 09:06
An example of using React Hooks with jQuery and Chosen plugin. `Chosen` is the original example using a class and `Chosed` is the "modern" approach using functions and hooks.
const Chosed = (props) => {
const elmt = React.useRef()
React.useLayoutEffect(()=>{
const $elmt = $(elmt.current)
const handleChange = (e) => {
props.onChange(e.target.value);
}
$elmt.chosen()
@chiplay
chiplay / system.tsx
Last active October 25, 2021 06:39
Styled-system + Typescript
import React, { HTMLAttributes } from 'react'; // version 16.4.2
import styled from 'styled-components'; // version 4.0.3
import * as SS from 'styled-system'; // version 3.2.0
import * as CSS from 'csstype';
export interface BaseProps extends HTMLAttributes<HTMLDivElement> {}
export interface BoxProps extends BaseProps,
SS.BgColorProps,
SS.SpaceProps,