oliviertassinari / react-event-listener Goto Github PK
View Code? Open in Web Editor NEWA React component for binding events on the global scope. :dizzy:
License: MIT License
A React component for binding events on the global scope. :dizzy:
License: MIT License
Thanks for this component!
I was thinking about the way how events are handled in capture phase - React use onEventXXXCapture, so have you considered this approach? Is it worth to create pull request or is there design decision behind having special capture
prop?
The rollup config references a module build, however...
https://unpkg.com/[email protected]/dist/react-event-listener.esm.js does not exist
https://unpkg.com/[email protected]/dist/react-event-listener.cjs.js exists
I noticed Webpack bundles @babel/runtime and I traced it back to this module. Is it necessary to include it in prod build? I'd like to reduce build size and react-event-listener is 1.82kb while @babel/runtime is 2.3kb.
Hello, thank you for great lib. Unfortunately, i have one problem:
const tree = renderer.create(<EventListener target={window} onBeforeUnloadCapture={() => {}} />).toJSON();
expect(tree).toMatchSnapshot();
The problem is the snapshot printing is trying to serialize whole window/document object and fails. Please consider to allow to pass "window" and "document" as strings again.
Branch | Build failing 🚨 |
---|---|
Dependency | babel-plugin-transform-react-remove-prop-types |
Current Version | 0.4.3 |
Type | devDependency |
This version is covered by your current version range and after updating it in your project the build failed.
As babel-plugin-transform-react-remove-prop-types is “only” a devDependency of this project it might not break production or downstream projects, but “only” your build or test tools – preventing new deploys or publishes.
I recommend you give this issue a high priority. I’m sure you can resolve this 💪
// In type Props = { bar?: string, };function MyComponent(props: Props) {
return <div {...props} />;
}// Babel Transformations
[
'babel-plugin-flow-react-proptypes',
'babel-plugin-transform-flow-strip-types',
'babel-plugin-transform-react-remove-prop-types',
]// Out
function MyComponent(props) {
return React.createElement('div', props);
}MyComponent.propTypes = process.env.NODE_ENV !== 'production' ? {
bar: require('prop-types').string
} : {};
The new version differs by 3 commits0.
9de2a21
0.4.4
98e2d54
Merge pull request #105 from oliviertassinari/flow-fix
463d987
fix(flow): use case
false
See the full diff
There is a collection of frequently asked questions and of course you may always ask my humans.
Your Greenkeeper Bot 🌴
Support the upcoming version of React mui/material-ui#6520.
We will rewrite the Material-UI codebase using hooks at some point. We might be able to simplify things using the hook API, to investigate.
Not sure if it would require more work than just changing the one line in the package file.
Can't seem to make it work in Edge-browser.
<EventListener target='window' onKeyPress={this.handleDocumentClick} />
handleDocumentClick(e) {
console.log(e)
}
Works fine in Chrome & FF
When rendering this component in IE10, I get a TypeError exception with a message of "Cannot call a class as a function". I get this error using version 0.5.9, but everything seems to work fine using version 0.5.3. I have not tested the versions in between.
It seems that this there is a bug in the transpilation with causes the prototype to not be wired up correctly for IE10.
The error is thrown in react-dom. react-dom wants the following property to be defined in order to use the component as a constructor.
EventListenter.prototype.isReactComponent
In IE10 this expression is undefined. One thing I did notice is that this expression IS defined:
EventListener.prototype.__proto__.isReactComponent
react-dom attempts to render this as a functional component instead of a class component, which is what causes the exception to be thrown.
Hi! We use a package that depends on react-event-listener in version 5.x. Since Babel broke something in their last beta (beta 56) we have an error. I see you fixed it in the version 6.2 but as we use version 5 we don’t have the fix :(
Would it be possible to create a new version 5.10 that integrates the fix, i.e. fixes @babel/runtime version to 7.0.0-beta.42?
I could actually create a PR, but for that I would need a branch v5… ;)
Thanks!
First, thanks a lot for this declarative event listener approach! It's very nice :)
I found my self needing a global onClick event to listen for when to call a onRequestClose
callback to close a Popover component but the listener get there too early and calling onRequestClose
on the same click that opened it.
So... I added a quick implementation for setTimeout
below that successfully solved my problem. What you think of this new prop, is it viable or am I miss-using the react-event-listener concept?
export default class EventListener extends React.Component {
static propTypes = {
...
setTimeout: React.PropTypes.number,
}
constructor(props) {
super(props)
}
componentDidMount() {
if (this.props.setTimeout) {
setTimeout(() => {
listenersForEach(this.props, (element, eventName, callback) => {
on(element, eventName, callback)
})
}, this.props.setTimeout)
} else {
listenersForEach(this.props, (element, eventName, callback) => {
on(element, eventName, callback)
})
}
Material-UI only supports IE11 and above. We can remove the following logic and save space.
react-event-listener/src/index.js
Lines 39 to 42 in fdf4afd
For instance, take the following TypeScript example:
export default class MyComponent extends React.Component<any, any> {
constructor() {
super();
this.handleDocumentKeyDown = this.handleDocumentKeyDown.bind(this);
}
public render(): JSX.Element {
return (
<div>
<FooComponent />
<EventListener
target="document"
onKeyDown={this.handleDocumentKeyDown} />
<BarComponent />
</div>
);
}
private handleDocumentKeyDown(event: any): void {
if (event.keyCode === KeyCodes.Enter) {
// do something...
}
}
}
How do I render MyComponent
, create and set a spy function on onKeyDown
property of EventListener
and simulate that event (with proper key code as parameter) so that I can assert that the spy was called with the expected key code?
I am using Jest (jest.fn()
to create spies) and Enzyme (shallow render) on my test suite but if you give me an example with other framework/tools, maybe I can convert it to my own. I just need a push in the right direction...
I've already tried something like the following:
const spy = jest.fn();
const myComponent = shallow(<MyComponent />);
const eventListener = myComponent.find(EventListener).dive();
eventListener.setProps({
onKeyDown: spy,
});
eventListener.simulate("onKeyDown");
expect(spy).toHaveBeenCalled();
But it was never called... Not sure what I'm doing wrong :(
Thanks for the project, this is a great idea!
Should react be added as a peer dependency to the package.json?
Thank you for awesome library!
I want to improve the performance of window.onscroll
. must use the addEventListener
passive option for that.
There are several proposals in the options of how to specify, what do you think?
// App.js
import EventListener, { withOptions } from "react-event-listener";
class Example extends Component {
handleScroll(e) {
// ...
}
render() {
return (
<EventListener
target={window}
onScroll={withOptions(this.handleScroll, {capture: false, passive: true})}
/>
);
}
}
Pass a handler in object form, there is a pattern to specify the options.
I believe that this pattern is good.
<EventListener
target={window}
onScrollPassive={this.handleScroll}
/>
onScrollCapturePassiveFooBar
)<EventListener
passive
target={window}
onScrollPassive={this.handleScroll}
/>
passive
options would be across all of the handler. (Example: onResize
)IE8 for the simple sample has been excluded.
// Check compatible
let supportsPassive = false;
try {
const options = Object.defineProperty({}, 'passive', {
get() {
supportsPassive = true;
}
});
window.addEventListener('test', null, options);
} catch (e) {}
// Usage
function on(target, type, handler, options) {
let optionsOrCapture = options;
if (!supportsPassive) {
optionsOrCapture = options.capture;
}
target.addEventListener(type, handler, optionsOrCapture);
}
function off(target, type, handler, options) {
// ...
}
Issue:
ERROR in ../~/react-event-listener/lib/index.js
Module not found: Error: Cannot resolve module 'babel-runtime/core-js/object/get-prototype-of' in /../node_modules/react-event-listener/lib
@ ../~/react-event-listener/lib/index.js 7:22-78
According to https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-runtime, babel-runtime should be add as dependencies.
Here are my dependencies from package.json
:
"devDependencies": {
"@babel/cli": "7.2.3",
"@babel/core": "7.3.3",
"@babel/plugin-proposal-class-properties": "7.3.3",
"@babel/plugin-proposal-decorators": "7.3.0",
"@babel/plugin-proposal-object-rest-spread": "7.3.2",
"@babel/preset-env": "7.3.1",
"@babel/preset-react": "7.0.0",
"@babel/register": "7.0.0",
"app-module-path": "2.2.0",
"autoprefixer": "9.4.8",
"babel-eslint": "10.0.1",
"babel-loader": "8.0.5",
"chai": "4.2.0",
"clean-webpack-plugin": "1.0.1",
"css-loader": "2.1.0",
"enzyme": "3.9.0",
"enzyme-adapter-react-16": "1.9.1",
"eslint": "5.14.1",
"eslint-plugin-react": "7.12.4",
"file-loader": "3.0.1",
"jquery-param": "1.0.1",
"jsdom": "11.11.0",
"jsonwebtoken": "8.5.0",
"mocha": "6.0.0",
"node-sass": "4.11.0",
"npm-run-all": "4.1.5",
"postcss": "7.0.14",
"postcss-loader": "3.0.0",
"redux-devtools": "3.5.0",
"redux-devtools-extension": "2.13.8",
"resolve-url-loader": "3.0.1",
"sass-loader": "7.1.0",
"sinon": "7.2.4",
"style-loader": "0.23.1",
"stylelint": "9.10.1",
"stylelint-config-standard": "18.2.0",
"stylelint-scss": "3.5.3",
"uglifyjs-webpack-plugin": "2.1.1",
"url-loader": "1.1.2",
"webpack": "4.29.5",
"webpack-clean-obsolete-chunks": "0.4.0",
"webpack-cli": "3.2.3"
},
"dependencies": {
"@babel/polyfill": "7.2.5",
"@material-ui/core": "3.9.2",
"@material-ui/icons": "3.0.2",
"@material-ui/lab": "3.0.0-alpha.30",
"anchorme": "1.1.2",
"bootstrap": "3.3.5",
"classnames": "2.2.6",
"crypto-js": "3.1.9-1",
"googleapis": "15.0.0",
"history": "4.7.2",
"ismobilejs": "0.5.1",
"isomorphic-fetch": "2.2.1",
"jquery": "3.3.1",
"lodash": "4.17.11",
"moment": "2.24.0",
"prop-types": "15.7.2",
"query-string": "5",
"react": "16.8.2",
"react-autosuggest": "9.4.3",
"react-bootstrap": "0.32.4",
"react-color": "2.17.0",
"react-datepicker": "1.6.0",
"react-dom": "16.8.2",
"react-joyride": "1.11.4",
"react-modal": "3.8.1",
"react-redux": "5.0.7",
"react-router-dom": "4.3.1",
"react-slick": "0.23.2",
"react-tooltip": "3.9.2",
"react-ultimate-pagination-bootstrap-3": "1.2.0",
"react-virtualized": "9.21.0",
"recharts": "1.5.0",
"redux": "4.0.1",
"redux-logger": "3.0.6",
"redux-thunk": "2.3.0",
"slick-carousel": "1.8.1",
"sprintf-js": "1.1.2",
"validator": "6.2.0"
}
I tried upgrading the following Material UI packages:
However, here the are the errors I'm getting when webpack
is running:
When I looked at the react-event-listener.cjs.js
file in my node_modules/react-event-listener
, I see that it is referencing babel
packages with this directory structure:
It seems to be looking for a builtin
directory inside of the babel
package. However, when I looked at the babel
package in my node_modules
, I notice that there isn't a builtin
directory under the helpers
directory:
As a test, I modified the react-event-listener.cjs.js
file and removed the reference to the builtin
directory and webpack
seems to compile and my application seems to work.
Can you let me know how I can get rid of this webpack compilation error so that I can successfully upgrade to Material UI 3.9.2?
Branch | Build failing 🚨 |
---|---|
Dependency | mocha |
Current Version | 3.3.0 |
Type | devDependency |
This version is covered by your current version range and after updating it in your project the build failed.
As mocha is “only” a devDependency of this project it might not break production or downstream projects, but “only” your build or test tools – preventing new deploys or publishes.
I recommend you give this issue a high priority. I’m sure you can resolve this 💪
Mocha is now moving to a quicker release schedule: when non-breaking changes are merged, a release should happen that week.
This week's highlights:
allowUncaught
added to commandline as --allow-uncaught
(and bugfixed)--no-warnings
and --trace-warnings
flags (@sonicdoe)The new version differs by 9 commits0.
7554b31
Add Changelog for v3.4.0
9f7f7ed
Add --trace-warnings
flag
92561c8
Add --no-warnings
flag
ceee976
lint test/integration/fixtures/simple-reporter.js
dcfc094
Revert "use semistandard
directly"
93392dd
no special case for macOS running Karma locally
4d1d91d
--allow-uncaught cli option
fb1e083
fix allowUncaught in browser
4ed3fc5
Add license report and scan status
false
See the full diff
There is a collection of frequently asked questions and of course you may always ask my humans.
Your Greenkeeper Bot 🌴
Seems that something is broken in latest release. I had to roll back to 0.5.3
.
./node_modules/react-event-listener/dist/react-event-listener.esm.js
Module not found: Can't resolve '@babel/runtime/helpers/builtin/es6/getPrototypeOf' in '/xxx/node_modules/react-event-listener/dist'
Came here from mui/material-ui#10793. Currently I see 2 warnings. One for this library and the other for react-transition-group
.
Currently, the component does not do anything if no target
prop was specified.
It probably should use window
or at least warn about a missing target.
the link in this repo's CHANGELOG points to https://github.com/oliviertassinari/react-swipeable-views/releases. Got me really confused, since I use both packages in my project (react-event-listener being a dependency by material-ui which broke when I tried to upgrade to material-ui v1 (related to #90))
It has anyway to detect mouse and keyboard event when browser is minimize? I need some suggestion. Thank you.
Error: node_modules/react-event-listener/src/index.js:49
49: children?: React.Element,
^^^^^^^^^^^^^^^^^^ Element. Property not found in
v-
234: declare export default {|
235: +DOM: typeof DOM,
236: +PropTypes: typeof PropTypes,
...:
248: |};
-^ object type. See lib: /private/tmp/flow/flowlib_5981b62/react.js:234
Error: node_modules/react-event-listener/src/index.js:102
102: class EventListener extends Component {
^^^^^^^^^ identifier Component
. Too few type arguments. Expected at least 1
29: declare class React$Component<Props, State = void> {
^^^^^^^^^^^^ See type parameters of definition here. See lib: /private/tmp/flow/flowlib_5981b62/react.js:29
With Flow version 42.0, I get a bunch of Flow errors (both in my project using this library, and in a fresh checkout of this library alone)
src/index.js:57
57: iteratee: (eventName: string, listener: Function, options?: EventOptions) => any,
^^^^^^^^ function type. Callable signature not found in
80: iteratee(eventName, prop, mergeDefaultEventOptions({ capture }));
^^^^ EventTarget
src/index.js:57
57: iteratee: (eventName: string, listener: Function, options?: EventOptions) => any,
^^^^^^^^ function type. Callable signature not found in
80: iteratee(eventName, prop, mergeDefaultEventOptions({ capture }));
^^^^ React$Element
src/index.js:78
78: iteratee(eventName, prop.handler, prop.options);
^^^^^^^ property `handler`. Property cannot be accessed on possibly undefined value
78: iteratee(eventName, prop.handler, prop.options);
^^^^ undefined
src/index.js:78
78: iteratee(eventName, prop.handler, prop.options);
^^^^^^^ property `handler`. Property not found in
78: iteratee(eventName, prop.handler, prop.options);
^^^^ EventTarget
src/index.js:78
78: iteratee(eventName, prop.handler, prop.options);
^^^^^^^ property `handler`. Property not found in
78: iteratee(eventName, prop.handler, prop.options);
^^^^ React$Element
src/index.js:78
78: iteratee(eventName, prop.handler, prop.options);
^^^^^^^ property `options`. Property cannot be accessed on possibly undefined value
78: iteratee(eventName, prop.handler, prop.options);
^^^^ undefined
src/index.js:78
78: iteratee(eventName, prop.handler, prop.options);
^^^^^^^ property `options`. Property not found in
78: iteratee(eventName, prop.handler, prop.options);
^^^^ EventTarget
src/index.js:78
78: iteratee(eventName, prop.handler, prop.options);
^^^^^^^ property `options`. Property not found in
78: iteratee(eventName, prop.handler, prop.options);
^^^^ React$Element
src/index.js:80
80: iteratee(eventName, prop, mergeDefaultEventOptions({ capture }));
^^^^ undefined. This type is incompatible with the expected param type of
57: iteratee: (eventName: string, listener: Function, options?: EventOptions) => any,
^^^^^^^^ function type
The [email protected] split @babel/runtime into two separate runtime modules.
and the react-event-listener will resolve the @babel/runtime/helpers/builtin/typeof
and other helpers, but they were removed to another package, so it will throw not found error.
Trying to update prod dependencies on my project and would like as little headache as possible.
Hi there, thanks for the great library!
I want to attach a transitionend
event to my component, but I want to avoid using React's synthetic event system because I need to know the specific time the real browser event occurred. For context, this is so I can measure the time between events with the User Timing API.
I have something like this:
<EventListener
target={this.transitionEl}
onTransitionEnd={this.onTransitionEnd.bind(this)}
>
<div
ref={(ref) => { this.transitionEl = ref; }}
>
// …
This works, but I get a warning because, on the initial render, this.transitionEl
is undefined
(the ref
hasn't been set yet).
Is this safe to do? Do you have any better recommendations?
Thanks!
Nice module.
I'm trying the following
import React from 'react'
import Router from 'react-router'
import { Route, DefaultRoute, RouteHandler } from 'react-router'
import LocalStorageMixin from 'react-localstorage'
import EventListener from 'react-event-listener'
/*
* Top level Component
*/
let App = React.createClass({
mixins: [
EventListener,
LocalStorageMixin
],
listeners: {
document: {
visibilitychange: 'onVisibilityChange'
}
},
onVisibilityChange: function() {
// the variable this refers to the document object
console.log('visbility state:', this)
},
render() {
return (
<RouteHandler />
)
}
})
the this object looks like
I was expecting it to return the document
object. Which would have document.hidden
Recently material-ui was updated to use babel/[email protected], however this project is pinned to babel/[email protected].
The main issue is that these two versions of babel/runtime are incompatible - so doing a yarn install --flat
creates a breaking build :(
Here are all the errors that I am seeing when I try to force babel/[email protected] ... It looks like a couple of things were removed...
ERROR in ../client_modules/node_modules/react-event-listener/dist/react-event-listener.cjs.js
Module not found: Error: Can't resolve '@babel/runtime/helpers/builtin/classCallCheck' in 'C:\projects\kalix.ui\client_modules\node_modules\react-event-listener\dist'
@ ../client_modules/node_modules/react-event-listener/dist/react-event-listener.cjs.js 7:38-94
@ ../client_modules/node_modules/@material-ui/core/Tabs/Tabs.js
@ ../client_modules/node_modules/@material-ui/core/Tabs/index.js
@ ../client_modules/node_modules/@material-ui/core/index.es.js
@ ./app.js
@ ./index.js
@ multi ../node_modules/webpack-dev-server/client?http://localhost:3000 ../node_modules/webpack/hot/dev-server.js babel-polyfill index
ERROR in ../client_modules/node_modules/react-event-listener/dist/react-event-listener.cjs.js
Module not found: Error: Can't resolve '@babel/runtime/helpers/builtin/createClass' in 'C:\projects\kalix.ui\client_modules\node_modules\react-event-listener\dist'
@ ../client_modules/node_modules/react-event-listener/dist/react-event-listener.cjs.js 8:35-88
@ ../client_modules/node_modules/@material-ui/core/Tabs/Tabs.js
@ ../client_modules/node_modules/@material-ui/core/Tabs/index.js
@ ../client_modules/node_modules/@material-ui/core/index.es.js
@ ./app.js
@ ./index.js
@ multi ../node_modules/webpack-dev-server/client?http://localhost:3000 ../node_modules/webpack/hot/dev-server.js babel-polyfill index
ERROR in ../client_modules/node_modules/react-event-listener/dist/react-event-listener.cjs.js
Module not found: Error: Can't resolve '@babel/runtime/helpers/builtin/inherits' in 'C:\projects\kalix.ui\client_modules\node_modules\react-event-listener\dist'
@ ../client_modules/node_modules/react-event-listener/dist/react-event-listener.cjs.js 10:32-82
@ ../client_modules/node_modules/@material-ui/core/Tabs/Tabs.js
@ ../client_modules/node_modules/@material-ui/core/Tabs/index.js
@ ../client_modules/node_modules/@material-ui/core/index.es.js
@ ./app.js
@ ./index.js
@ multi ../node_modules/webpack-dev-server/client?http://localhost:3000 ../node_modules/webpack/hot/dev-server.js babel-polyfill index
ERROR in ../client_modules/node_modules/react-event-listener/dist/react-event-listener.cjs.js
Module not found: Error: Can't resolve '@babel/runtime/helpers/builtin/objectSpread' in 'C:\projects\kalix.ui\client_modules\node_modules\react-event-listener\dist'
@ ../client_modules/node_modules/react-event-listener/dist/react-event-listener.cjs.js 13:36-90
@ ../client_modules/node_modules/@material-ui/core/Tabs/Tabs.js
@ ../client_modules/node_modules/@material-ui/core/Tabs/index.js
@ ../client_modules/node_modules/@material-ui/core/index.es.js
@ ./app.js
@ ./index.js
@ multi ../node_modules/webpack-dev-server/client?http://localhost:3000 ../node_modules/webpack/hot/dev-server.js babel-polyfill index
ERROR in ../client_modules/node_modules/react-event-listener/dist/react-event-listener.cjs.js
Module not found: Error: Can't resolve '@babel/runtime/helpers/builtin/objectWithoutProperties' in 'C:\projects\kalix.ui\client_modules\node_modules\react-event-listener\dist'
@ ../client_modules/node_modules/react-event-listener/dist/react-event-listener.cjs.js 12:47-112
@ ../client_modules/node_modules/@material-ui/core/Tabs/Tabs.js
@ ../client_modules/node_modules/@material-ui/core/Tabs/index.js
@ ../client_modules/node_modules/@material-ui/core/index.es.js
@ ./app.js
@ ./index.js
@ multi ../node_modules/webpack-dev-server/client?http://localhost:3000 ../node_modules/webpack/hot/dev-server.js babel-polyfill index
ERROR in ../client_modules/node_modules/react-event-listener/dist/react-event-listener.cjs.js
Module not found: Error: Can't resolve '@babel/runtime/helpers/builtin/possibleConstructorReturn' in 'C:\projects\kalix.ui\client_modules\node_modules\react-event-listener\dist'
@ ../client_modules/node_modules/react-event-listener/dist/react-event-listener.cjs.js 9:49-116
@ ../client_modules/node_modules/@material-ui/core/Tabs/Tabs.js
@ ../client_modules/node_modules/@material-ui/core/Tabs/index.js
@ ../client_modules/node_modules/@material-ui/core/index.es.js
@ ./app.js
@ ./index.js
@ multi ../node_modules/webpack-dev-server/client?http://localhost:3000 ../node_modules/webpack/hot/dev-server.js babel-polyfill index
ERROR in ../client_modules/node_modules/react-event-listener/dist/react-event-listener.cjs.js
Module not found: Error: Can't resolve '@babel/runtime/helpers/builtin/typeof' in 'C:\projects\kalix.ui\client_modules\node_modules\react-event-listener\dist'
@ ../client_modules/node_modules/react-event-listener/dist/react-event-listener.cjs.js 11:30-78
@ ../client_modules/node_modules/@material-ui/core/Tabs/Tabs.js
@ ../client_modules/node_modules/@material-ui/core/Tabs/index.js
@ ../client_modules/node_modules/@material-ui/core/index.es.js
@ ./app.js
@ ./index.js
@ multi ../node_modules/webpack-dev-server/client?http://localhost:3000 ../node_modules/webpack/hot/dev-server.js babel-polyfill index
Branch | Build failing 🚨 |
---|---|
Dependency | enzyme |
Current Version | 2.8.0 |
Type | devDependency |
This version is covered by your current version range and after updating it in your project the build failed.
As enzyme is “only” a devDependency of this project it might not break production or downstream projects, but “only” your build or test tools – preventing new deploys or publishes.
I recommend you give this issue a high priority. I’m sure you can resolve this 💪
The new version differs by 33 commits .
8ab9528
v2.8.1
75d1390
Merge pull request #876 from kentcdodds/pr/support-15.5
21f6e7a
[Tests] create-react-class
should be a static dev dependency.
4464a17
[Tests] move helpers in to test/_helpers
dir
22f368f
address final comments
cc78489
Update error message in react-compat
b48e551
Change condition in performBatchedUpdates
to a version check
2f957af
REACT155 constant is now true for react 15.5 or above
f5f6001
Update ReactWrapperComponent to use prop-types package
3ff9832
Update karma cofig to be compatible with [email protected]
ec7bbc5
Lint
270ee7f
Remove unnecessary tests
d6badda
Fix import
edeb99c
Remove dependency on create-react-class
b0e2fac
Extract batchedUpdates to a function
There are 33 commits in total. See the full diff.
There is a collection of frequently asked questions and of course you may always ask my humans.
Your Greenkeeper Bot 🌴
Would be nice to have react normalized events (+.nativeEvent property) like for all others events (see https://reactjs.org/docs/events.html)
Meteor.js doesn't like Babel 7.0.0 due to a breaking change. Please can you update the package dependency to 7.1.2?
First of all - great component!
Two question though:
is using window[target] not considered antipattern? is this not targeting the DOM itself, instead of the shadow dom, thus breaking the react tree/chain?
Also - is there a way to make the target element a specific react component, instead of a dom element?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.