Comments (6)
Eh, I figured that thing would be a thing by now (and I thought it was seeing how nodejs has it which I thought meant chrome did as well), but it looks like Chrome and Firefox don't like it for various "reasons" (very longs issue threads...). It is a standard, just an unofficial one which looks like will it never make it pass the editor's draft phase.
We use drafts all of the time (though usually working drafts) and depend on polyfills and transforms to allow us to use them.
Also, if you are using react, you are already including a polyfill for setImmediate
via: setimmediate <- fbjs <- react
That being said, I'm going to make it so setImmediate
doesn't need to be defined. ((window.setImmediate || setTimeout)(() => this.topFocus && this.topFocus.focus());
will probably work best)
from react-block-ui.
I am using react, but I don't use the polyfill, I guess this is why I got that error. :)
Thank you for your reply, I've solved it already.
from react-block-ui.
I am not 100% sure how you are not using the polyfill since it is included with react via react's dependencies. Maybe treeshaking is removing it?
from react-block-ui.
I've been looking into React's code, and React doc website https://facebook.github.io/react/docs/hello-world.html, and I think React doesn't include setImmediate
, because
-
If we open the browser's console, type
typeof setImmediate
on the React website, it isundefined
. It means nosetImmediate
exist in global, even React exist. -
And it seems React doesn't
require
setImmediate from fbjs to attach it to global.
So, you can find setImmediate in the global scope? ...mmm ... weird :)
from react-block-ui.
I have never used react with UMD imports and script tags like that, it appears they have a special build which limits the things they import from fbjs probably to help minimize the size. https://github.com/facebook/react/blob/2fa38ac1cce658ce799a162e65fcf782187c8802/scripts/rollup/modules.js#L188-L196
from react-block-ui.
Yes ... :) I am still using require
, and using browserify to bundle react.
so, if we cannot guarantee setImmediate()
exist in global scope, I suggest to use setTimeout({fn}, 0)
, which should always works across browsers and server-rendering.
from react-block-ui.
Related Issues (20)
- Cannot find module: 'react-block-ui/redux'. Make sure this package is installed. HOT 3
- Move to availity-react HOT 2
- Could not find type declaration for module react-block-ui HOT 3
- Warning: unstable_flushDiscreteUpdates HOT 25
- Typings problem with tag prop HOT 3
- React 16.9 warning - componentWillReceiveProps HOT 16
- reduxMiddleware examples/documentation wrong? HOT 1
- Doesnโt block responsive design HOT 2
- keepInView start working after scroll HOT 2
- Use Portal for span in BlockUI to prevent validateDomNesting warnings HOT 2
- Unable to improve reduxMiddleware from react-block-ui/reduxMiddleware HOT 2
- Warning | validateDOMNesting For Helper Ref HOT 1
- In combination with MUI and rematch I am getting: Module not found: Can't resolve 'react-block-ui/reduxMiddleware' in HOT 3
- React functional component : can we setState on form load as all components are disabled
- Question - Block only one child in a list HOT 4
- How to change the overlay opacity. HOT 1
- ComponentWillReceiveProps has been renamed, and is not recommended for use. HOT 3
- Cannot use react-block-ui with React 17 HOT 6
- Still able to navigate with tab between inputs and enter data
- Allow passing of aria-label for Accessibility HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-block-ui.