This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// There area lot more checks in the Redux lib but this gets the point across. | |
function createStore(reducer, initialState) { | |
let currentState = initialState; | |
const listeners = []; | |
function getState() { | |
return currentState; | |
} | |
function subscribe(listener) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { CSSTransition as ReactCSSTransition } from 'react-transition-group' | |
import { useRef, useEffect, useContext } from 'react' | |
const TransitionContext = React.createContext({ | |
parent: {}, | |
}) | |
function useIsInitialRender() { | |
const isInitialRender = useRef(true) | |
useEffect(() => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let urls = $('a').toArray().map(a => $(a).attr('href')) | |
let images = $('img').toArray().map(img => $(img).attr('src')) | |
let css = $('link[rel="stylesheet"]').toArray().map(css => $(css).attr('href')) | |
let js = $('script').toArray().map(js => $(js).attr('src')) |
OlderNewer