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
| const mapping = { | |
| // `id` passed as regular prop | |
| actions: [ | |
| areasLogic, [ | |
| 'setAreaHover#id', | |
| 'clearAreaHover', | |
| 'editArea#id', | |
| 'clearSelection' | |
| ] |
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, { Component, PropTypes } from 'react' | |
| import ReactHelmet from 'react-helmet' | |
| class PlainComponent extends Component { | |
| render () { | |
| return null | |
| } | |
| } | |
| export default class Helmet extends Component { |
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
| // see the accompanying kea/logic example here: https://gist.github.com/mariusandra/1b8eeb3f2f4e542188b915e27133c858 | |
| import Saga from 'kea/saga' | |
| import sceneLogic from './logic' | |
| export default class InboxThreadSaga extends Saga { | |
| // pick actions from logic stores | |
| actions = () => ([ | |
| sceneLogic, [ | |
| 'makeBookingRequest', |
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
| // see the accompanying kea/saga example here: https://gist.github.com/mariusandra/e6091b393e153c9edf3ba451a9d91aeb | |
| import Logic from 'kea/logic' | |
| import { PropTypes } from 'react' | |
| import { initFromProps } from '~/scenes/index' | |
| class InboxThreadLogic extends Logic { | |
| path = () => ['scenes', 'inboxThread', 'index'] |
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
| SMS_7BIT_CHARACTERS = [ | |
| # Standard Latin Characters | |
| 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', | |
| 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', | |
| 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', | |
| 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', | |
| # Numbers | |
| '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', |
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, { Component } from 'react' | |
| import { connect, inline } from 'kea/logic' | |
| import { put } from 'redux-saga/effects' | |
| import someLogic from './some/logic' | |
| @connect({ | |
| actions: [ | |
| someLogic, [ | |
| 'doSomething' |
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 './styles.scss' | |
| import React, { Component } from 'react' | |
| import PropTypes from 'prop-types' | |
| import { kea } from 'kea' | |
| const books = { | |
| 1: 'book1', | |
| 2: 'book2' | |
| } |
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 './styles.scss' | |
| import React, { Component } from 'react' | |
| import PropTypes from 'prop-types' | |
| import { kea } from 'kea' | |
| const books = { | |
| 1: 'book1', | |
| 2: 'book2' | |
| } |
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, { Component } from 'react' | |
| export default class Counter extends Component { | |
| constructor (props) { | |
| this.state = { | |
| counter: 0 | |
| } | |
| } | |
| handleIncrement = (amount) => { |
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, { Component } from 'react' | |
| import PropTypes from 'prop-types' | |
| import { kea } from 'kea' | |
| @kea({ | |
| actions: () => ({ | |
| increment: (amount) => ({ amount }), | |
| decrement: (amount) => ({ amount }) | |
| }), |
OlderNewer