somonus / react-native-echarts

Echarts for react-native. The react-naitve chart.
MIT License
721 stars 309 forks source link

Two different objects are still equal, it also causes re-render not work #68

Open webeautiful opened 6 years ago

webeautiful commented 6 years ago

https://github.com/somonus/react-native-echarts/blob/eeeaead411f01907be5ee2d033c11366e4c2b127/src/components/Echarts/index.js#L8

ljingya commented 6 years ago

because object cant compare, you can so if (JSON.stringify(this.props.option) !== JSON.stringify(nextProps.option)) {