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
// 1. Search for "workbench color" in the VSC settings panel | |
// 2. Select "Edit in settings.json" for "Color Customizations" setting | |
// 3. Add the following to the "settings.json" file | |
"workbench.colorCustomizations": { | |
"statusBar.background": "#323232", | |
"statusBar.foreground": "#e0e0e0" | |
} | |
// No more nasty blue status bar :) |
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
// | |
// component class | |
// | |
import React from 'react' | |
import { CounterTest } from 'app/stores' | |
export class Example extends React.Component { | |
componentDidMount() { | |
CounterTest.subscribe(this) |
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
// | |
// app/state/TestCounter.js | |
// | |
// Contains partial application state, a bit like a small Redux store. | |
// It is a standard class with static fields and methods. | |
// | |
import { store } from 'app/decorators'; | |
@store |
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
export const useLifeCycle = (initialize, values) => { | |
const { mount, unmount, update } = useMemo(initialize, []); | |
useEffect(() => { | |
if (typeof mount === 'function') { | |
mount(values); | |
} | |
return () => { | |
if (typeof unmount === 'function') { |