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"; | |
import ColorAppStore from "../stores/ColorAppStore"; | |
export default class ColorComponent extends React.Component { | |
constructor(props) { | |
super(props); | |
this.state = { | |
color: ColorAppStore.getActiveColor() | |
} |
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 dispatcher from "../Dispatcher"; | |
import {EventEmitter} from "events"; | |
import * as ColorAppActions from "../actions/ColorAppActions"; | |
class ColorAppStore extends EventEmitter { | |
constructor() { | |
super(); | |
this.activeColor = "lightgrey"; | |
} |
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 dispatcher from "../Dispatcher"; | |
export const COLOR_APP_ACTIONS = { | |
CHANGE_COLOR: 'colorAppActions.ChangeColor' | |
}; | |
export function changeColor(colorName) { | |
dispatcher.dispatch({ | |
type: COLOR_APP_ACTIONS.CHANGE_COLOR, | |
value: colorName |
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 {Dispatcher} from "flux"; | |
export default new Dispatcher(); |
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
.color-container { | |
width: 400px; | |
height: 400px; | |
} | |
.color-button { | |
width: 50px; | |
height: 20px; | |
margin: 10px; | |
background-color: #dddddd; |
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"; | |
import ButtonComponent from "./components/ButtonComponent"; | |
import ColorComponent from "./components/ColorComponent"; | |
export default class App extends React.Component { | |
render() { | |
return ( | |
<div> | |
<ButtonComponent/> |
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"; | |
export default class ColorComponent extends React.Component { | |
constructor(props) { | |
super(props); | |
this.state = { | |
color: "lightgrey" | |
} | |
} |
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
"GET /apple-touch-icon.png HTTP/1.1" 1 | |
"GET /assets/css/style.css HTTP/1.1" 2 | |
"GET /assets/data-tables/icons.css HTTP/1.1" 2 | |
"GET /assets/data-tables/index.css HTTP/1.1" 2 | |
"GET /assets/data-tables/themes/material.css HTTP/1.1" 3 | |
"GET /assets/date-range-picker/daterangepicker.min.css HTTP/1.1" 2 | |
"GET /assets/date-range-picker/daterangepicker.min.css.map HTTP/1.1" 16 | |
"GET /assets/date-range-picker/daterangepicker.min.js HTTP/1.1" 2 | |
"GET /assets/date-range-picker/daterangepicker.min.js.map HTTP/1.1" 15 | |
"GET /assets/date-range-picker/moment.min.js HTTP/1.1" 4 |
NewerOlder