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 PropTypes from 'prop-types'; | |
import { connect } from 'react-redux'; | |
import MyComponent from '../components/MyComponent'; | |
import { pressed } from '../actions/actionCreators'; | |
function mapStateToProps({ mySelector: { foo } }) { | |
return { foo }; | |
} |
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 ReactDOM from 'react-dom'; | |
import { AppContainer } from 'react-hot-loader'; | |
import Test from './components/Test'; | |
global.document.addEventListener('DOMContentLoaded', () => { | |
ReactDOM.render( | |
<AppContainer> | |
<Test /> |
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
var myController = function() { | |
// create some event handlers | |
}; | |
myController.destroy = function() { | |
// I do not believe you have access to anything declared in the myController function here. | |
}; |
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
class AttachmentActions { | |
readPage(pageRecord) { | |
return AttachmentAPI.readPage(pageRecord) | |
.then(stuff => this.actions.readPageSuccess(stuff, pageRecord)); | |
} | |
} | |
class AttachmentStore { | |
fetchNextPage() { | |
let pageRecord = this.getNextPageRecord(); |
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
class MyActions { | |
constructor() { | |
this.generateActions('loadSuccess', 'loadFailure'); | |
} | |
load() { | |
this.dispatch(); | |
asyncLoad() | |
.then(resp => this.actions.loadSuccess(resp)) |
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
const MyFunctionalityComponent = React.createClass({ | |
myFunctionalityMethod() { | |
// do some functionality | |
} | |
render() { | |
if (isMobile) { | |
return <MyMobileComponent onInteraction={this.myFunctionalityMethod} /> | |
} else { | |
return <MyDesktopComponent onInteraction={this.myFunctionalityMethod} /> |
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
Notifications Paging Issue Repro Steps: | |
1. Accumulate enough notifications so that you have more than two 'pages' worth (may also repro with just more than one 'page' worth, | |
can't remember). | |
2. Go to your 'Notifications' page. | |
3. 'X' through all notifications in the current page. | |
4. Click the 'Next' button (the next logical step if you are trying to delete all existing notifications, IMO at least). | |
5. Observe that you have now 'skipped' over a page of notifications that you must get to by either reloading the entire 'Notifications' page | |
or by clicking the 'Previous' button. |
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
var participationKey = '<YOUR PARTICIPATION KEY>'; | |
var resourceID = '78179599f104fa8838912daed302ce2169f64971'; | |
var swarmID = '399ed6780318c0a5f9f25c34b2a947657057534c'; | |
SWARM.connect({apikey: participationKey, | |
resource: resourceID, | |
swarms: [swarmID], | |
//callbacks | |
onconnect: |
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
<html lang="en" xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> | |
<head> | |
<title>BUGswarm</title> | |
<script src="http://d1z10qq7obk1ve.cloudfront.net/swarm/swarm-v0.3.2.js" type="text/javascript"></script> | |
</head> |