Package Exports
- remix-react-native-pressable
- remix-react-native-pressable/dist/index.js
- remix-react-native-pressable/dist/remix-react-native-pressable.esm.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (remix-react-native-pressable) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
remix-react-native-pressable
React Native Web's <Pressable>
, but with Remix's <Link>
magic.
How to use:
Install it with your favorite package manager:
# npm
npm install remix-react-native-pressable
# yarn
yarn add remix-react-native-pressable
# pnpm
pnpm add remix-react-native-pressable
Imagine <RemixPressable>
is like a Remix <Link>
, but with all the React Native Web Pressable
props!
Here's a little example using the to
property.
import { View, Text } from 'react-native';
import { RemixPressable } from 'remix-react-native-pressable';
export default function MyRemixRoute() {
return (
<View>
<RemixPressable to="/about">
<Text>Link to /about</Text>
</RemixPressable>
</View>
);
}
We also provide a <RemixPressableChildren>
component and a useRemixPressableProps
hook, in case you want to build your own wrapper or use the render prop pattern.
More docs:
- Check out the Remix's
<Link>
documentation for more info. - Since Remix's
<Link>
wraps React Router DOM's<Link>
, you can use the same props. - Also, React Native Web's
<Pressable>
has a full list of props.
Contributors
Horus Lugo 🚧 🤔 💻 🎨 👀 |