From 75abe2c78a8a8f9a016f75060a0cec0e417368df Mon Sep 17 00:00:00 2001 From: ChenEvai <497983114@qq.com> Date: Mon, 5 Feb 2018 17:47:44 +0800 Subject: [PATCH 1/2] rn version >= 18 bug fixed --- CountDownText.js | 2 +- package.json | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CountDownText.js b/CountDownText.js index 47a59ad..913971c 100644 --- a/CountDownText.js +++ b/CountDownText.js @@ -19,7 +19,7 @@ var { Text, } = React; -var update = React.addons.update, +var update = require('react-addons-update'), countDown = require('./countDown'); var CountDownText = React.createClass({ diff --git a/package.json b/package.json index 6a6f97e..e412284 100644 --- a/package.json +++ b/package.json @@ -19,5 +19,8 @@ "bugs": { "url": "https://github.com/shigebeyond/react-native-sk-countdown/issues" }, - "homepage": "https://github.com/shigebeyond/react-native-sk-countdown#readme" + "homepage": "https://github.com/shigebeyond/react-native-sk-countdown#readme", + "dependencies": { + "react-addons-update": "^15.6.2" + } } From d68f6794c45483dfe2784a5e9b7638f4a26a3d2c Mon Sep 17 00:00:00 2001 From: ChenEvai <497983114@qq.com> Date: Mon, 5 Feb 2018 17:49:48 +0800 Subject: [PATCH 2/2] rn version >= 18 --- CountDownText.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CountDownText.js b/CountDownText.js index 913971c..a5690e6 100644 --- a/CountDownText.js +++ b/CountDownText.js @@ -12,12 +12,12 @@ this.refs.countDownText.end(); 'use strict' -var React = require('react-native'); +import React from 'react' -var { +import { StyleSheet, - Text, -} = React; + Text +} from 'react-native'; var update = require('react-addons-update'), countDown = require('./countDown');