-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#30: cleanup react, keep only basic stuff
- Loading branch information
Showing
13 changed files
with
54 additions
and
1,231 deletions.
There are no files selected for viewing
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 file was deleted.
Oops, something went wrong.
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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,5 @@ | ||
'use strict'; | ||
|
||
if (typeof Promise === 'undefined') { | ||
// Rejection tracking prevents a common issue where React gets into an | ||
// inconsistent state due to an error, but it gets swallowed by a Promise, | ||
// and the user has no idea what causes React's erratic future behavior. | ||
require('promise/lib/rejection-tracking').enable(); | ||
window.Promise = require('promise/lib/es6-extensions.js'); | ||
} | ||
|
||
// fetch() polyfill for making API calls. | ||
require('whatwg-fetch'); | ||
|
||
// Object.assign() is commonly used with React. | ||
// It will use the native implementation if it's present and isn't buggy. | ||
Object.assign = require('object-assign'); | ||
|
||
// In tests, polyfill requestAnimationFrame since jsdom doesn't provide it yet. | ||
// We don't polyfill it in the browser--this is user's responsibility. | ||
if (process.env.NODE_ENV === 'test') { | ||
require('raf').polyfill(global); | ||
} |
Oops, something went wrong.