nandorojo / solito

🧍‍♂️ React Native + Next.js, unified.
https://solito.dev
MIT License
3.54k stars 181 forks source link

add asChild prop to give a bit more flexibility for native #115

Closed natew closed 2 years ago

natew commented 2 years ago

Sorry for the low effort here, want to verify first this is a decent way.

I have a problem: we use Pressability for some elements already, but a Pressability inside a Pressability prevents the outer one from receiving onPress.

So just workshopped this without testing, but something like this would work. It's a bit weird to be divergent props for native/web, but the as prop already diverges.

vercel[bot] commented 2 years ago

Someone is attempting to deploy a commit to a Personal Account owned by @nandorojo on Vercel.

@nandorojo first needs to authorize it.

vercel[bot] commented 2 years ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment | Name | Status | Preview | Updated | | :--- | :----- | :------ | :------ | | **solito-app** | ⬜️ Ignored ([Inspect](https://vercel.com/fernandorojo/solito-app/CEUZFe2o4RpWG6V3xHGVFYfuqGmP)) | | Jul 21, 2022 at 9:08AM (UTC) |
nandorojo commented 2 years ago

Would the useLink hook be sufficient instead to let you make a custom Link?

natew commented 2 years ago

👍