- Create actions similar to Flummox.
- Generate action ids.
- Supports actions with decorators, promises, and therefore ES7 async.
react + redux + RR
It uses https://gist.github.com/iNikNik/3c1b870f63dc0de67c38 for stores and actions.
1) create redux
const redux = createRedux(state);
2) get requireAccess func => bindCheckAuth to redux
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
"devDependencies": { | |
"babel-plugin-syntax-class-properties": "^6.0.14", | |
"babel-preset-react": "^6.1.2", | |
"eslint": "^1.9.0", | |
"eslint-loader": "^1.1.1", | |
"babel-core": "^6.1.2", | |
"babel-loader": "^6.0.1", | |
"babel-preset-es2015": "^6.1.2", | |
}, |
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
Show hidden characters
{ | |
"stage": 2, | |
"loose": "all" | |
} |
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
var Col = require('react-bootstrap/lib/Col') | |
var PageHeader = require('react-bootstrap/lib/PageHeader') | |
var React = require('react') | |
var Row = require('react-bootstrap/lib/Row') | |
var {connect} = require('react-redux') | |
var {reduxForm} = require('redux-form') | |
var DateInput = require('./DateInput') | |
var FormField = require('./FormField') | |
var LoadingButton = require('./LoadingButton') |
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 RECEIVE_MESSAGE = 'RECEIVE_MESSAGE'; |
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 {Dropdown} from 'react-bootstrap'; | |
import {SelectList} from 'react-widgets'; | |
const selectData = ['Red', 'Blue', 'Green']; | |
export default class extends Component { | |
constructor(props) { | |
super(props); | |
this.state = { |
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 React from 'react' | |
import Form from 'react-formal' | |
import { | |
Alert, | |
Button, | |
Col, ControlLabel, | |
Form as BsForm, FormControl, FormGroup as BsFormGroup, | |
HelpBlock, | |
} from 'react-bootstrap' |
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
<body> | |
<div id="⚛️"></div> | |
<script src="https://unpkg.com/[email protected]/umd/react.development.js"></script> | |
<script src="https://unpkg.com/[email protected]/umd/react-dom.development.js"></script> | |
<script src="https://unpkg.com/[email protected]/babel.js"></script> | |
<script type="text/babel"> | |
ReactDOM.render(<div>Hello World!</div>, document.getElementById('⚛️')) | |
</script> | |
</body> |
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 arr = [2, 7, 1, 3, 9, 5, 10, 4, 6, 8]; | |
/* | |
Bubble Sort | |
Loop through the array comparing each item with the adjacent item. | |
If the item value is less than the item to the left, swap the two items. | |
Repeat until you make it through the entire array without swapping any items. | |
O(n^2) time complexity worst case |
OlderNewer