Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert Example Apps to TypeScript and Add Expo Support #913

Open
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

hellostu
Copy link
Contributor

@hellostu hellostu commented Oct 13, 2024

This PR introduces the following updates to the react-native-external-display library:

Conversion of Example Apps to TypeScript:

The example apps have been fully converted from JavaScript to TypeScript, providing better type safety and improving the overall developer experience when working with the examples.

Added Support for Expo:

The example apps have been updated to run within the Expo environment, making it easier for developers using Expo to integrate and test the external display functionality. This PR deletes all the native Objective-C and Java code, allowing Expo to auto-generate the required native code. The iPad example applies its changes via a custom Expo plugin, streamlining the integration with Expo's ecosystem.

Migration to Yarn 4.5:

The project now uses Yarn 4.5 to manage dependencies, bringing improvements in dependency resolution, performance, and workspace handling.

GitHub Actions Update for Expo:

This PR also includes updates to the GitHub Actions configuration. The workflow has been updated to use the new Expo versions of the example apps for continuous integration (CI). These changes ensure that the build and testing pipelines reflect the new Expo-based project setup, including the removal of native code and the auto-generation of necessary build files via Expo.

Rationale:

These changes aim to:

  • Enhance developer experience by leveraging TypeScript for static typing and error checking.
  • Expand compatibility with the Expo ecosystem, allowing more developers to easily explore the library’s functionality without requiring a custom native build setup.
  • Improve dependency management and build performance through the use of Yarn 4.5.
  • Streamline the CI process with the updated GitHub Actions to ensure that the Expo-based apps are correctly built and tested in the pipeline.

@hellostu hellostu changed the title Use Expo example app on Expo 51 Convert Example Apps to TypeScript and Add Expo Support Oct 13, 2024
@hellostu hellostu marked this pull request as draft October 14, 2024 07:28
@hellostu hellostu changed the title Convert Example Apps to TypeScript and Add Expo Support WIP: Convert Example Apps to TypeScript and Add Expo Support Oct 14, 2024
@hellostu hellostu force-pushed the expo-example branch 2 times, most recently from 79b7a27 to c0193dd Compare October 15, 2024 21:56
@hellostu hellostu force-pushed the expo-example branch 4 times, most recently from f70369e to 85e9952 Compare October 15, 2024 22:26
@hellostu hellostu marked this pull request as ready for review October 16, 2024 19:53
@hellostu hellostu changed the title WIP: Convert Example Apps to TypeScript and Add Expo Support Convert Example Apps to TypeScript and Add Expo Support Oct 17, 2024
node_modules
apps
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should keep eslint for apps.

We can follow our projects that already used TypeScript: https://github.com/mybigday/llama.rn/blob/f35545b92241d8cc9ee2b22b5ca4c02b395db9bb/package.json#L127-L203

Then the package also needs to be rewritten in TypeScript since it uses Flow, and it may need a build script.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants