react-dom-confetti
Advanced tools
Comparing version 0.1.1 to 0.1.2
@@ -40,6 +40,6 @@ "use strict"; | ||
_createClass(Confetti, [{ | ||
key: "componentWillReceiveProps", | ||
value: function componentWillReceiveProps(nextProps) { | ||
if (nextProps.active && !this.props.active) { | ||
(0, _domConfetti.confetti)(this.container, nextProps.config); | ||
key: "componentDidUpdate", | ||
value: function componentDidUpdate(prevProps) { | ||
if (!prevProps.active && this.props.active) { | ||
(0, _domConfetti.confetti)(this.container, this.props.config); | ||
} | ||
@@ -46,0 +46,0 @@ } |
{ | ||
"name": "react-dom-confetti", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"description": "react component for dom-confetti", | ||
@@ -5,0 +5,0 @@ "main": "lib/confetti.js", |
@@ -14,5 +14,5 @@ import React, { Component } from "react"; | ||
componentWillReceiveProps(nextProps) { | ||
if (nextProps.active && !this.props.active) { | ||
confetti(this.container, nextProps.config); | ||
componentDidUpdate(prevProps) { | ||
if (!prevProps.active && this.props.active) { | ||
confetti(this.container, this.props.config); | ||
} | ||
@@ -19,0 +19,0 @@ } |
6621