rubyforgood / Flaredown

Flaredown web app and API
http://www.flaredown.com
GNU General Public License v3.0
39 stars 15 forks source link

Add react native directory #678

Closed hussam-i-am closed 1 year ago

hussam-i-am commented 1 year ago

Ran the "Getting Started" instructions on https://reactnative.dev/docs/environment-setup?guide=quickstart. Called the directory native but open to other suggestions.

This pull request also includes a variety of changes to improve the functionality and usability of the React Native app, including adding dependencies and scripts for running and testing, configuring Docker and Docker Compose, and adding basic configurations for webpack.

Caveats

As mentioned in the docs, if we want to use the expo tooling, we won't be able to support native code out of the box.

The Expo Go app is a great tool to get started — it exists to help developers quickly get projects off the ground, to experiment with ideas (such as on Snack) and share their work with minimal friction. Expo Go makes this possible by including a feature-rich native runtime made up of every module in the Expo SDK, so all you need to do to use a module is install the package with npx expo install and reload your app.

The tradeoff is that the Expo Go app does not allow you to add custom native code — you can only use native modules built into the Expo SDK. There are many great libraries available outside of the Expo SDK, and you may even want to build your own native library. You can leverage these libraries with development builds, or by using "prebuild" to generate the native projects, or both. Learn more about adding native code to projects created with create-expo-app.

create-expo-app configures your project to use the most recent React Native version that is supported by the Expo SDK. The Expo Go app usually gains support for a given React Native version with new SDK versions (released quarterly). You can check this document to find out what versions are supported.

If you're integrating React Native into an existing project, you can use the Expo SDK and development builds, but you will need to set up a native development environment. Select "React Native CLI Quickstart" above for instructions on configuring a native build environment for React Native.

Tonkpils commented 1 year ago

Shall we add a github action to get us started for ensuring the app is built and tested? I know we don't have anything right now but would be good as an initial item for this as well.

hussam-i-am commented 1 year ago

@Tonkpils added a jest test and action to run npm run test