capsize icon indicating copy to clipboard operation
capsize copied to clipboard

Add React Native integration

Open markdalgleish opened this issue 3 years ago • 2 comments

In order to better support the React Native integration, I also added a precomputeNumericValues function to the core package since the existing logic returns strings of CSS values which React Native doesn't support. Not 100% on the naming and it's quite likely we'll want to change it, but wanted to at least get a working implementation in there.

To see the example for yourself, assuming you've set up your environment for React Native:

yarn
yarn preconstruct build
yarn workspace react-native-example start

For iOS, run yarn workspace react-native-example ios, or if that doesn't work, open examples/react-native/ios/example.xcworkspace and click the play button in the toolbar (or hit Cmd+R).

For Android, run yarn workspace react-native-example android while you've got an Android emulator open.

The example is a bit heavy so I can see that there's room for debate about whether to include it in the repo or not, but I figured that it's important to have a working example we can reference if we want to make changes to the implementation.

markdalgleish avatar Sep 29 '21 07:09 markdalgleish

🦋 Changeset detected

Latest commit: 5173be45dbf297929fbf724c312b26105e5696d7

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@capsizecss/core Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

changeset-bot[bot] avatar Sep 29 '21 07:09 changeset-bot[bot]

I made react-native-capsize a while ago, really glad to see React Native getting official support!

Not sure about this repo owning the react-native example code though, as it looks like something that would likely rot quickly. The boundary looks simple enough, so maybe stand up a separate repo and link to it from the integration repo?

Maybe we could use Expo for the example project instead? That would significantly reduce the size of the project and allow people to run the example without Android Studio or XCode.

phamfoo avatar Sep 30 '21 13:09 phamfoo

Hey is there still any interest in getting this merged?

I'd be happy to take a look at it if there is. I could set up an Expo project to replace the example and make adjustments to the way this is set up to get it up to date with the current package version. Do you have any more thoughts on precomputeNumericValues api at this point?

I can piggy-back off of this PR or make a new one if that sounds more sensible.

gunnnnii avatar Dec 30 '22 13:12 gunnnnii

For transparency, I spoke to @markdalgleish a while ago about it offline, and I dont think taking on the maintenance of the react-native setup in the examples would be a good move for the project.

Not ruling out a simpler seam in the future, but for now i'll close this one off.

michaeltaranto avatar Nov 14 '23 01:11 michaeltaranto