From 2a55fbaf39937ec2785947d822bfdffb1354d9d3 Mon Sep 17 00:00:00 2001 From: Chris Bobbe Date: Wed, 21 Jul 2021 13:40:36 -0400 Subject: [PATCH] NavButtonGeneral [nfc]: Convert to function component. --- src/nav/NavButtonGeneral.js | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/src/nav/NavButtonGeneral.js b/src/nav/NavButtonGeneral.js index 9deea6fc079..84adb58b751 100644 --- a/src/nav/NavButtonGeneral.js +++ b/src/nav/NavButtonGeneral.js @@ -1,5 +1,5 @@ /* @flow strict-local */ -import React, { PureComponent } from 'react'; +import React from 'react'; import type { Node } from 'react'; import { View } from 'react-native'; @@ -21,14 +21,12 @@ const componentStyles = createStyleSheet({ }, }); -export default class NavButtonGeneral extends PureComponent { - render() { - const { children, onPress, accessibilityLabel } = this.props; +export default function NavButtonGeneral(props: Props) { + const { children, onPress, accessibilityLabel } = props; - return ( - - {children} - - ); - } + return ( + + {children} + + ); }