capacitor VS react-native

Compare capacitor vs react-native and see what are their differences.

capacitor

Build cross-platform Native Progressive Web Apps for iOS, Android, and the Web ⚡️ (by ionic-team)
Our great sponsors
  • Appwrite - The Open Source Firebase alternative introduces iOS support
  • InfluxDB - Access the most powerful time series database as a service
  • Sonar - Write Clean JavaScript Code. Always.
capacitor react-native
125 444
9,034 108,322
3.3% 1.0%
9.6 10.0
1 day ago 4 days ago
JavaScript JavaScript
MIT License MIT License
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

capacitor

Posts with mentions or reviews of capacitor. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-03-15.

react-native

Posts with mentions or reviews of react-native. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-03-17.
  • Building an Image Recognition App in Javascript using Pinecone, Hugging Face, and Vercel
    5 projects | dev.to | 17 Mar 2023
    React Native (and Expo) is a framework that allows us to build native mobile applications using Javascript and React. React Native also gives us access to many of the sensors and features that exist on phones, such as the camera, which we will use to capture images for our app.
  • Am I still relevant as a programmer now that there's AI?
    2 projects | news.ycombinator.com | 14 Mar 2023
    i am sad to say that lists and tables are totally unsolved problems, look how many issues there are in react's virtualized list[1] (just an example, not picking on react)

    but i think we are talking about the same thing :) programming is creative, and for me it is art, i love it.

    https://github.com/facebook/react-native/issues?q=is%3Aissue...

  • Starting a personal hobby project, could use some advice on the techstack
    7 projects | reddit.com/r/learnprogramming | 13 Mar 2023
    You mentioned you want the mobile app to be for Android only. You could consider using Flutter or React Native, which will allow your app to run on both, iOS and Android. However, this will probably take some extra time since you might need to learn a new language. So if you're set on using Android Studio and presumably Java or Kotlin, then go with that.
  • How to use registerForActivityResult with TurboModules in react native's new architecture?
    2 projects | reddit.com/r/reactnative | 3 Mar 2023
    Firstly I am not talking about the old architecture and I have already gone through this
  • Visualizing your photos on a map with React Native
    3 projects | dev.to | 1 Mar 2023
    The reason behind choosing my tech stack was to get to know modern SPA frameworks better. So naturally, my choice was React Native. As a novice in mobile development, I decided to start with Expo. It is a nice way to start the project since it contains a couple of templates as well as a nice debugging toolset.
  • Turn-by-turn navigation w/ Mapbox drop-in UI in React-Native
    2 projects | reddit.com/r/mapbox | 28 Feb 2023
    /** * Sample React Native App * https://github.com/facebook/react-native * * @format */ import React from 'react'; import type { PropsWithChildren } from 'react'; import { Button, SafeAreaView, ScrollView, StatusBar, StyleSheet, Text, useColorScheme, View, } from 'react-native'; import { Colors, DebugInstructions, Header, ReloadInstructions, } from 'react-native/Libraries/NewAppScreen'; import { NativeModules } from 'react-native'; import { PermissionsAndroid } from 'react-native'; import { MapboxNavigation } from './src/MapboxNavigationView'; type SectionProps = PropsWithChildren<{ title: string; }>; function Section({ children, title }: SectionProps): JSX.Element { const isDarkMode = useColorScheme() === 'dark'; return ( {title} {children} ); } function App(): JSX.Element { const isDarkMode = useColorScheme() === 'dark'; const backgroundStyle = { backgroundColor: isDarkMode ? Colors.darker : Colors.lighter, }; const { MapboxNavigationModule, TestModule } = NativeModules; const NewModuleButton = () => { const onPress = () => { MapboxNavigationModule.createNavigationEvent('25 Commerce Crescent, Kramerville, Johannesburg, 2090'); }; return ( ); }; const TestModuleButton = () => { const onPress = () => { TestModule.createTestEvent('25 Commerce Crescent, Kramerville, Johannesburg, 2090'); }; return ( ); }; const requestLocationPermission = async () => { try { const granted = await PermissionsAndroid.request( PermissionsAndroid.PERMISSIONS.ACCESS_FINE_LOCATION, { title: 'Need to know where you are Permission', message: 'Gief location access ' + 'so that I can navigate you.', buttonNeutral: 'Ask Me Later', buttonNegative: 'Cancel', buttonPositive: 'OK', }, ); console.log(granted) if (granted === PermissionsAndroid.RESULTS.GRANTED) { console.log('You can use location'); } else { console.log('Location permission denied'); } } catch (err) { console.warn(err); } }; const requestNotificationPermission = async () => { try { const granted = await PermissionsAndroid.request( PermissionsAndroid.PERMISSIONS.POST_NOTIFICATIONS, { title: 'Be notifed Dammit Permission', message: 'Gief permissions to notify ' + 'so that I can notify you.', buttonNeutral: 'Ask Me Later', buttonNegative: 'Cancel', buttonPositive: 'OK', }, ); console.log(granted) if (granted === PermissionsAndroid.RESULTS.GRANTED) { console.log('You can use notfications'); } else { console.log('Notifications permission denied'); } } catch (err) { console.warn(err); } }; return ( Edit App.tsx to change this screen and then come back to see your edits. ); } const styles = StyleSheet.create({ sectionContainer: { marginTop: 32, paddingHorizontal: 24, }, sectionTitle: { fontSize: 24, fontWeight: '600', }, sectionDescription: { marginTop: 8, fontSize: 18, fontWeight: '400', }, highlight: { fontWeight: '700', }, }); export default App;
  • Which is the best lib/framework option for a single code base for web, Android &amp; iOS?
    3 projects | reddit.com/r/webdev | 25 Feb 2023
    If you want a single codebase for web and mobile I would look into react-native and react-native-web. You could probably code the web app with react-native-web, make it responsive and build it through react-native for mobile. Designing an app for mobile and for web can lead to significant difference though since the experience is quite different. Some things might make sense for a mobile and not for a desktop or the opposite. So I wouldn't discard completely the idea of having separate codebases. Highly depends on the app though, totally valid for many use cases.
  • testflight-dev-deploy &amp; dev-client-mac-tools
    3 projects | reddit.com/r/reactnative | 24 Feb 2023
    The only reason why DevClient apps can't be deployed through TestFlight is because the React Native dev tools use parts of Apples API that aren't public. Apple checks for the use of non-public API and won't allow any apps that use to to be deployed through it's ecosystem. Luckily the only place where non-public API is used in React Native is inside RCTKeyCommands.m, a helper that registers key shortcuts that hardly anyone uses outside the Simulator. So the only thing this plugin does is disabling this one file and everything just works.
  • 10 Coding Projects to Impress Employers and Land Your Dream Job 😎
    13 projects | dev.to | 18 Feb 2023
    React Native - a popular framework for building mobile apps with JavaScript
  • Getting the eror after running command `npx pod-install`
    2 projects | reddit.com/r/reactnative | 18 Feb 2023
    [!] /bin/bash -c set -e #!/bin/bash # Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. set -e PLATFORM_NAME="${PLATFORM_NAME:-iphoneos}" CURRENT_ARCH="${CURRENT_ARCH}" if [ -z "$CURRENT_ARCH" ] || [ "$CURRENT_ARCH" == "undefined_arch" ]; then # Xcode 10 beta sets CURRENT_ARCH to "undefined_arch", this leads to incorrect linker arg. # it's better to rely on platform name as fallback because architecture differs between simulator and device if [[ "$PLATFORM_NAME" == *"simulator"* ]]; then CURRENT_ARCH="x86_64" else CURRENT_ARCH="arm64" fi fi # @lint-ignore-every TXT2 Tab Literal if [ "$CURRENT_ARCH" == "arm64" ]; then cat <<\EOF >>fix_glog_0.3.5_apple_silicon.patch diff --git a/config.sub b/config.sub index 1761d8b..43fa2e8 100755 --- a/config.sub +++ b/config.sub @@ -1096,6 +1096,9 @@ case $basic_machine in basic_machine=z8k-unknown os=-sim ;; + arm64-*) + basic_machine=$(echo $basic_machine | sed 's/arm64/aarch64/') + ;; none) basic_machine=none-none os=-none EOF patch -p1 config.sub fix_glog_0.3.5_apple_silicon.patch fi export CC="$(xcrun -find -sdk $PLATFORM_NAME cc) -arch $CURRENT_ARCH -isysroot $(xcrun -sdk $PLATFORM_NAME --show-sdk-path)" export CXX="$CC" # Remove automake symlink if it exists if [ -h "test-driver" ]; then rm test-driver fi # Manually disable gflags include to fix issue https://github.com/facebook/react-native/issues/28446 sed -i.bak -e 's/\@ac_cv_have_libgflags\@/0/' src/glog/logging.h.in && rm src/glog/logging.h.in.bak sed -i.bak -e 's/HAVE_LIB_GFLAGS/HAVE_LIB_GFLAGS_DISABLED/' src/config.h.in && rm src/config.h.in.bak ./configure --host arm-apple-darwin cat << EOF >> src/config.h /* Add in so we have Apple Target Conditionals */ #ifdef __APPLE__ #include #include #endif /* Special configuration for ucontext */ #undef HAVE_UCONTEXT_H #undef PC_FROM_UCONTEXT #if defined(__x86_64__) #define PC_FROM_UCONTEXT uc_mcontext->__ss.__rip #elif defined(__i386__) #define PC_FROM_UCONTEXT uc_mcontext->__ss.__eip #endif EOF # Prepare exported header include EXPORTED_INCLUDE_DIR="exported/glog" mkdir -p exported/glog cp -f src/glog/log_severity.h "$EXPORTED_INCLUDE_DIR/" cp -f src/glog/logging.h "$EXPORTED_INCLUDE_DIR/" cp -f src/glog/raw_logging.h "$EXPORTED_INCLUDE_DIR/" cp -f src/glog/stl_logging.h "$EXPORTED_INCLUDE_DIR/" cp -f src/glog/vlog_is_on.h "$EXPORTED_INCLUDE_DIR/" patching file config.sub checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for arm-apple-darwin-strip... no checking for strip... strip checking for a thread-safe mkdir -p... ./install-sh -c -d checking for gawk... no checking for mawk... no checking for nawk... no checking for awk... awk checking whether make sets $(MAKE)... yes checking whether make supports nested variables... yes checking for arm-apple-darwin-gcc... /Library/Developer/CommandLineTools/usr/bin/cc -arch arm64 -isysroot checking whether the C compiler works... no xcrun: error: SDK "iphoneos" cannot be located xcrun: error: SDK "iphoneos" cannot be located xcrun: error: SDK "iphoneos" cannot be located xcrun: error: unable to lookup item 'Path' in SDK 'iphoneos' /Users/apurvc99/Library/Caches/CocoaPods/Pods/External/glog/2263bd123499e5b93b5efe24871be317-04b94/missing: Unknown `--is-lightweight' option Try `/Users/apurvc99/Library/Caches/CocoaPods/Pods/External/glog/2263bd123499e5b93b5efe24871be317-04b94/missing --help' for more information configure: WARNING: 'missing' script is too old or missing configure: error: in `/Users/apurvc99/Library/Caches/CocoaPods/Pods/External/glog/2263bd123499e5b93b5efe24871be317-04b94': configure: error: C compiler cannot create executables See `config.log' for more details Couldn't install Pods. Updating the Pods project and trying again... > pod install --repo-update Auto-linking React Native module for target `rnVideoStreamerApp`: VisionCamera Framework build type is static library [Codegen] Generating ./build/generated/ios/React-Codegen.podspec.json Updating local specs repositories [!] CDN: trunk URL couldn't be downloaded: https://cdn.cocoapods.org/all_pods_versions_7_6_3.txt Response: Timeout was reached Couldn't install Pods. Updating the Pods project and trying again... Command `pod install` failed. └─ Cause: CDN: trunk URL couldn't be downloaded: https://cdn.cocoapods.org/all_pods_versions_7_6_3.txt Response: Timeout was reached

What are some alternatives?

When comparing capacitor and react-native you can also consider the following projects:

Quasar Framework - Quasar Framework - Build high-performance VueJS user interfaces in record time

NativeScript - ⚡ Empowering JavaScript with native platform APIs. ✨ Best of all worlds (TypeScript, Swift, Objective C, Kotlin, Java). Use what you love ❤️ Angular, Capacitor, Ionic, React, Svelte, Vue and you name it compatible.

tauri - Build smaller, faster, and more secure desktop applications with a web frontend.

Flutter - Flutter makes it easy and fast to build beautiful apps for mobile and beyond

Electron - :electron: Build cross-platform desktop apps with JavaScript, HTML, and CSS

vite-plugin-rsw - 🦞 wasm-pack plugin for Vite

svelte-capacitor - Build hybrid mobile apps using Svelte and CapacitorJS with live reloading on Android and iOS!

electron-sveltekit - Electron and SvelteKit integration

electron - Deploy your Capacitor apps to Linux, Mac, and Windows desktops, with the Electron platform! 🖥️

Preact - ⚛️ Fast 3kB React alternative with the same modern API. Components & Virtual DOM.

spine - Lightweight MVC library for building JavaScript applications

flutter-embedded-linux - Embedded Linux embedding for Flutter