Horje
useLinkPressHandler Code Example
useLinkPressHandler
// React Router v6 (Native)
// Same as 'useLinkClickHandler' from 'react-router-dom'
// returns a press event handler for custom <Link> navigation.
import { TouchableHighlight } from 'react-native';
import { useLinkPressHandler } from 'react-router-native';

function Link({ onPress, replace = false, state, to, ...rest }) {
  let handlePress = useLinkPressHandler(to, {
    replace,
    state,
  });

  return (
    <TouchableHighlight
      {...rest}
      onPress={e => {
        onPress?.(e);
        !e.defaultPrevented && handlePress(e);
      }}
    />
  );
}




Javascript

Related
why array.map returns undefined Code Example why array.map returns undefined Code Example
javascript refresh function every 5 seconds Code Example javascript refresh function every 5 seconds Code Example
vue date helper Code Example vue date helper Code Example
javascript convert array of objects to array of uri Code Example javascript convert array of objects to array of uri Code Example
currency conversion to locale string js Code Example currency conversion to locale string js Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
9