Skip to content

Commit 8dc3bd7

Browse files
committed
Use PureComponent for performance [#37]
1 parent da137be commit 8dc3bd7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* https://github.com/joshswan/react-native-autolink/blob/master/LICENSE
77
*/
88

9-
import React, { Component, createElement } from 'react';
9+
import React, { PureComponent, createElement } from 'react';
1010
import PropTypes from 'prop-types';
1111
import { Autolinker, AnchorTagBuilder } from 'autolinker/dist/es2015';
1212
import {
@@ -27,7 +27,7 @@ const styles = StyleSheet.create({
2727
},
2828
});
2929

30-
export default class Autolink extends Component {
30+
export default class Autolink extends PureComponent {
3131
static truncate(text, {
3232
truncate = 32,
3333
truncateChars = '..',

0 commit comments

Comments
 (0)