This file contains 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 * as React from "react"; | |
/** | |
A hook to simply use state between components | |
Warning: this only works with function components (like any hook) | |
Usage: | |
// You can put this in an central file and import it too | |
const useStore = createStore({ count: 0 }) |
If you enjoyed reading this, I'm intending to do more blogging like this over here: https://cdgd.tech
This is not a complaint about Webpack or v4 in any way. This is just a record of my process trying it out so I could provide feedback to the webpack team
Hmm... I don't see any docs for 4.0 on https://webpack.js.org. I guess I'll just wing it.
All I need to do is npm i -D webpack@next
, right?
+ webpack@4.0.0-beta.2
This file contains 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 React from 'react' | |
function defaultGetWidth () { | |
return window.innerWidth; | |
} | |
function defaultGetHeight () { | |
return window.innerHeight; | |
} |
This has been incorporated in a small library.
Hi there!
The docker cheat sheet has moved to a Github project under https://github.com/wsargent/docker-cheat-sheet.
Please click on the link above to go to the cheat sheet.
This file contains 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
requirejs.config({ | |
shim: { | |
'foundation/jquery.foundation.topbar': { | |
deps: ['jquery'], | |
}, | |
'foundation/jquery.cookie': { | |
deps: ['jquery'] | |
}, | |
'foundation/jquery.event.move': { | |
deps: ['jquery'] |