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
// This is an example of how to fetch external data in response to updated props, | |
// If you are using an async mechanism that does not support cancellation (e.g. a Promise). | |
class ExampleComponent extends React.Component { | |
_currentId = null; | |
state = { | |
externalData: null | |
}; |
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 { PropTypes, Children } from 'react'; | |
import classNames from 'classnames'; | |
/** | |
* Defines whether it's server or client side rendering environment (can use DOM client side) | |
* | |
* @type {Boolean} | |
*/ | |
const canUseDOM = !!( | |
typeof window !== 'undefined' && |
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
'use strict'; | |
module.exports = { | |
/** | |
* Checks if html5 input date is supported | |
* | |
* @return {Boolean} True if html5 input date is supported by the client browser | |
*/ | |
isInputDateSupported: function () { | |
var el = document.createElement('input'), |
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
body { | |
-moz-transform: scaleX(-1); | |
-o-transform: scaleX(-1); | |
-webkit-transform: scaleX(-1); | |
transform: scaleX(-1); | |
filter: FlipH; | |
-ms-filter: "FlipH"; | |
transform: rotateY(180deg); | |
} |
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
'use strict'; | |
module.exports = { | |
/** | |
* Checks for iOs, Android, Blackberry, Opera Mini, and Windows mobile devices | |
* Based on http://www.detectmobilebrowsers.com | |
* | |
* @return {Boolean} True if user agent is mobile | |
*/ | |
isMobile: function() { |