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(userAgent) { | |
| return StyleContainer.renderStaticStyles(userAgent) | |
| } |
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 RenderIf = (Component, condition) => { | |
| class Child extends Component { | |
| constructor(props) { | |
| super(props); | |
| } | |
| render() { | |
| if (condition(this.props, this.state)) { | |
| return super.render(); | |
| } | |
| return null; |
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 ReactDOM from 'react-dom'; | |
| import {Gmaps, Marker} from 'react-gmaps'; | |
| const App = React.createClass({ | |
| getInitialState() { | |
| return { | |
| open: false, | |
| lat: 51.5258541, |
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 ReactDOM from 'react-dom'; | |
| import {Gmaps} from 'react-gmaps'; | |
| const App = React.createClass({ | |
| onMapCreated(map) { | |
| map.setMapTypeId(google.maps.MapTypeId.HYBRID); | |
| }, |
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 ReactDOM from 'react-dom'; | |
| import {Gmaps} from 'react-gmaps'; | |
| let interval; | |
| const App = React.createClass({ | |
| getInitialState() { | |
| return { |
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 ReactDOM from 'react-dom'; | |
| import {Gmaps} from 'react-gmaps'; | |
| const App = React.createClass({ | |
| onMapCreated(map) { | |
| if (navigator.geolocation) { | |
| navigator.geolocation.getCurrentPosition((position) => { | |
| map.setCenter({ |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>The simplest SPA ever</title> | |
| <script type="text/javascript"> | |
| !function(){var analytics=window.analytics=window.analytics||[];if(!analytics.initialize)if(analytics.invoked)window.console&&console.error&&console.error("Segment snippet included twice.");else{analytics.invoked=!0;analytics.methods=["trackSubmit","trackClick","trackLink","trackForm","pageview","identify","reset","group","track","ready","alias","page","once","off","on"];analytics.factory=function(t){return function(){var e=Array.prototype.slice.call(arguments);e.unshift(t);analytics.push(e);return analytics}};for(var t=0;t<analytics.methods.length;t++){var e=analytics.methods[t];analytics[e]=analytics.factory(e)}analytics.load=function(t){var e=document.createElement("script");e.type="text/javascript";e.async=!0;e.src=("https:"===document.location.protocol?"https://":"http://")+"cdn.segment.com/analytics.js/v1/"+t+"/analytics.min.js";var n=document.getElementsByTagName("script")[0];n.parentNode. |
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 {contentLength, visibleLength} = this.refs.listView.scrollProperties; | |
| if (contentLength > visibleLength) { | |
| this.refs.listView.getScrollResponder().scrollTo(contentLength - visibleLength); | |
| } |
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 _ from 'lodash'; | |
| import {EventEmitter} from 'events'; | |
| const CHANGE_EVENT = 'change'; | |
| const BaseStore = _.assign({}, EventEmitter.prototype, { | |
| emitChange() { | |
| this.emit(CHANGE_EVENT); | |
| }, |
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 ReactDOM from 'react-dom'; | |
| import {Gmaps, Marker} from 'react-gmaps'; | |
| const coords = { | |
| lat: 51.5258541, | |
| lng: -0.08040660000006028 | |
| }; | |
| const App = React.createClass({ |