Skip to content

Instantly share code, notes, and snippets.

View Chun-Lin's full-sized avatar

Gary Wu Chun-Lin

View GitHub Profile
@Chun-Lin
Chun-Lin / App.js
Last active August 22, 2018 03:35
This is App component which give 'bold' props to Content component
class App extends Component {
render() {
return (
<div className="App">
<Content skyblue/>
</div>
)
}
}
@Chun-Lin
Chun-Lin / Content.jsx
Last active August 22, 2018 07:31
This is a component using inline-style to adjust the style
export default ({ skyblue }) => {
/* inline-style */
let style = {}
if (skyblue) {
style = { color: 'skyblue' }
}
return (
<div className="content">
<div className="content__img" />
@Chun-Lin
Chun-Lin / enzyme_render_diffs.md
Created July 5, 2018 08:05 — forked from fokusferit/enzyme_render_diffs.md
Difference between Shallow, Mount and render of Enzyme

Shallow

Real unit test (isolation, no children render)

Simple shallow

Calls:

  • constructor
  • render
@Chun-Lin
Chun-Lin / History|-bed935b|WALg.json
Last active May 25, 2022 03:17
Visual Studio Code Settings Sync Gist
{
"sync.gist": "3d21f64bee06ae95f3d1b7064f3784ba"
}