Remove MobX from Link (#1745)

* Remove MobX from Link

* Keep memo() though

We previously had observer() apply it automatically, so re-add it
zio/stable
dan 2023-10-25 16:47:21 +01:00 committed by GitHub
parent 32fbb9dba7
commit 4a4be1de1a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 5 deletions

View File

@ -1,5 +1,4 @@
import React, {ComponentProps, useMemo} from 'react' import React, {ComponentProps, memo, useMemo} from 'react'
import {observer} from 'mobx-react-lite'
import { import {
Linking, Linking,
GestureResponderEvent, GestureResponderEvent,
@ -50,7 +49,7 @@ interface Props extends ComponentProps<typeof TouchableOpacity> {
anchorNoUnderline?: boolean anchorNoUnderline?: boolean
} }
export const Link = observer(function Link({ export const Link = memo(function Link({
testID, testID,
style, style,
href, href,
@ -136,7 +135,7 @@ export const Link = observer(function Link({
) )
}) })
export const TextLink = observer(function TextLink({ export const TextLink = memo(function TextLink({
testID, testID,
type = 'md', type = 'md',
style, style,
@ -236,7 +235,7 @@ interface DesktopWebTextLinkProps extends TextProps {
accessibilityHint?: string accessibilityHint?: string
title?: string title?: string
} }
export const DesktopWebTextLink = observer(function DesktopWebTextLink({ export const DesktopWebTextLink = memo(function DesktopWebTextLink({
testID, testID,
type = 'md', type = 'md',
style, style,