Remove MobX from Link (#1745)
* Remove MobX from Link * Keep memo() though We previously had observer() apply it automatically, so re-add itzio/stable
parent
32fbb9dba7
commit
4a4be1de1a
|
@ -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,
|
||||||
|
|
Loading…
Reference in New Issue