Skip to content

Commit ec46b98

Browse files
committed
v4.3.0
1 parent 2b82254 commit ec46b98

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

dist/index.js

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,6 @@ function doSetAttribute(el, props, propName) {
4747
}
4848
}
4949

50-
/**
51-
* Batch `.setAttribute()`s, filtering out props not relevant to A-Frame.
52-
*/
53-
function doSetAttributes(el, props) {}
54-
5550
/**
5651
* Handle diffing of previous and current attributes.
5752
*
@@ -148,6 +143,19 @@ var Entity = exports.Entity = function (_React$Component) {
148143
updateAttributes(el, prevProps, props);
149144
}
150145
}
146+
}, {
147+
key: 'componentWillUnmount',
148+
value: function componentWillUnmount() {
149+
var el = this.el;
150+
var props = this.props;
151+
152+
if (props.events) {
153+
// Remove events.
154+
Object.keys(props.events).forEach(function (eventName) {
155+
removeEventListeners(el, eventName, props.events[eventName]);
156+
});
157+
}
158+
}
151159

152160
/**
153161
* Render A-Frame DOM with ref: https://facebook.github.io/react/docs/refs-and-the-dom.html

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "aframe-react",
3-
"version": "4.2.4",
3+
"version": "4.3.0",
44
"description": "Build virtual reality experiences with A-Frame and React.",
55
"main": "dist/index.js",
66
"scripts": {

0 commit comments

Comments
 (0)