Convert Figma logo to code with AI

GeekyAnts logovue-native-core

Vue Native is a framework to build cross platform native mobile apps using JavaScript

8,316
295
8,316
35

Top Related Projects

A framework for building native applications using React

⚡ Empowering JavaScript with native platform APIs. ✨ Best of all worlds (TypeScript, Swift, Objective C, Kotlin, Java, Dart). Use what you love ❤️ Angular, Capacitor, Ionic, React, Solid, Svelte, Vue with: iOS (UIKit, SwiftUI), Android (View, Jetpack Compose), Dart (Flutter) and you name it compatible.

A powerful cross-platform UI toolkit for building native-quality iOS, Android, and Progressive Web Apps with HTML, CSS, and JavaScript.

26,050

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

167,034

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

Quick Overview

Vue Native Core is a framework for building cross-platform native mobile apps using Vue.js. It allows developers to use Vue.js syntax and concepts to create native mobile applications for both iOS and Android platforms, leveraging the power of React Native under the hood.

Pros

  • Familiar Vue.js syntax and concepts for web developers
  • Cross-platform development for iOS and Android
  • Reusable components and state management with Vuex
  • Access to native device features through React Native APIs

Cons

  • Limited ecosystem compared to React Native
  • Potential performance overhead due to additional abstraction layer
  • Less mature and fewer resources compared to other mobile development frameworks
  • Dependency on both Vue.js and React Native ecosystems

Code Examples

  1. Creating a simple component:
<template>
  <view>
    <text>{{ message }}</text>
  </view>
</template>

<script>
export default {
  data() {
    return {
      message: 'Hello, Vue Native!'
    }
  }
}
</script>
  1. Handling user input:
<template>
  <view>
    <textinput
      v-model="inputText"
      placeholder="Enter your name"
    />
    <text>Hello, {{ inputText }}!</text>
  </view>
</template>

<script>
export default {
  data() {
    return {
      inputText: ''
    }
  }
}
</script>
  1. Using native components:
<template>
  <view>
    <button
      :on-press="handlePress"
      title="Click me!"
    />
  </view>
</template>

<script>
import { Alert } from 'react-native'

export default {
  methods: {
    handlePress() {
      Alert.alert('Button pressed!')
    }
  }
}
</script>

Getting Started

To start using Vue Native Core:

  1. Install Vue Native CLI:

    npm install -g vue-native-cli
    
  2. Create a new Vue Native project:

    vue-native init MyApp
    cd MyApp
    
  3. Install dependencies:

    npm install
    
  4. Run the app:

    npm run android
    # or
    npm run ios
    

Competitor Comparisons

A framework for building native applications using React

Pros of React Native

  • Larger community and ecosystem, with more third-party libraries and resources
  • Better performance for complex applications due to its optimized rendering engine
  • More mature and stable, with longer development history and backing from Facebook

Cons of React Native

  • Steeper learning curve, especially for developers new to React
  • More complex setup and configuration process
  • Larger app size due to the inclusion of the React Native runtime

Code Comparison

React Native:

import React from 'react';
import { View, Text } from 'react-native';

const App = () => (
  <View>
    <Text>Hello, React Native!</Text>
  </View>
);

Vue Native:

<template>
  <view>
    <text>Hello, Vue Native!</text>
  </view>
</template>

<script>
export default {
  // Component logic here
}
</script>

Vue Native provides a more familiar syntax for Vue.js developers, with a template-based approach similar to Vue's single-file components. React Native uses JSX and a more JavaScript-centric approach, which may be more appealing to developers with a strong JavaScript background.

Both frameworks allow for cross-platform mobile app development, but React Native has a larger market share and more extensive tooling support. Vue Native, being newer and less widely adopted, may have fewer resources available but could be a good choice for teams already familiar with Vue.js.

⚡ Empowering JavaScript with native platform APIs. ✨ Best of all worlds (TypeScript, Swift, Objective C, Kotlin, Java, Dart). Use what you love ❤️ Angular, Capacitor, Ionic, React, Solid, Svelte, Vue with: iOS (UIKit, SwiftUI), Android (View, Jetpack Compose), Dart (Flutter) and you name it compatible.

Pros of NativeScript

  • Mature and well-established framework with a larger community and ecosystem
  • Supports multiple JavaScript frameworks (Vue, Angular, React) and plain JavaScript
  • Provides direct access to native APIs without plugins

Cons of NativeScript

  • Steeper learning curve, especially for developers new to mobile development
  • Larger app size compared to Vue Native Core
  • Slower development process due to native compilation

Code Comparison

NativeScript (Vue.js):

<template>
  <Page>
    <ActionBar title="My App" />
    <StackLayout>
      <Label text="Hello, NativeScript!" />
    </StackLayout>
  </Page>
</template>

Vue Native Core:

import React from 'react';
import { View, Text } from 'react-native';

export default function App() {
  return (
    <View>
      <Text>Hello, Vue Native!</Text>
    </View>
  );
}

Vue Native Core uses React Native components and syntax, while NativeScript uses its own custom components that map to native UI elements. NativeScript's approach provides a more native-like development experience, but Vue Native Core leverages the existing React Native ecosystem.

A powerful cross-platform UI toolkit for building native-quality iOS, Android, and Progressive Web Apps with HTML, CSS, and JavaScript.

Pros of Ionic Framework

  • Mature ecosystem with extensive documentation and community support
  • Cross-platform development for web, iOS, and Android using a single codebase
  • Integrates well with popular web frameworks like Angular, React, and Vue

Cons of Ionic Framework

  • Larger bundle size and potentially slower performance compared to native apps
  • Limited access to native device features without additional plugins
  • Steeper learning curve for developers new to web technologies

Code Comparison

Ionic Framework:

import { Component } from '@angular/core';
import { IonicModule } from '@ionic/angular';

@Component({
  selector: 'app-home',
  template: '<ion-content>Hello Ionic!</ion-content>',
  standalone: true,
  imports: [IonicModule],
})
export class HomePage {}

Vue Native Core:

<template>
  <view>
    <text>Hello Vue Native!</text>
  </view>
</template>

<script>
export default {
  name: 'HomePage'
}
</script>

Summary

Ionic Framework offers a more comprehensive solution for cross-platform development with a mature ecosystem, while Vue Native Core provides a lightweight option for building native mobile apps using Vue.js. Ionic's approach is web-based, which can lead to larger bundle sizes but offers greater flexibility across platforms. Vue Native Core, on the other hand, compiles to native components, potentially resulting in better performance but with a more limited feature set.

26,050

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

Pros of Quasar

  • Comprehensive UI framework with a large set of pre-built components
  • Supports multiple build modes: SPA, SSR, PWA, and mobile apps
  • Active community and regular updates

Cons of Quasar

  • Steeper learning curve due to its extensive feature set
  • Larger bundle size compared to more lightweight alternatives
  • May be overkill for simple projects

Code Comparison

vue-native-core:

import React from 'react';
import { View, Text } from 'react-native';

export default function App() {
  return (
    <View>
      <Text>Hello, Vue Native!</Text>
    </View>
  );
}

Quasar:

<template>
  <q-page class="flex flex-center">
    <q-btn color="primary" label="Hello, Quasar!" />
  </q-page>
</template>

<script>
export default {
  name: 'PageIndex'
}
</script>

The code comparison shows that vue-native-core uses React Native components and syntax, while Quasar utilizes its own Vue-based components and structure. Quasar's approach provides a more integrated and consistent development experience within its ecosystem, whereas vue-native-core offers a bridge between Vue.js and React Native.

167,034

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

Pros of Flutter

  • Larger community and more extensive ecosystem
  • Better performance due to direct compilation to native code
  • More comprehensive documentation and learning resources

Cons of Flutter

  • Steeper learning curve, especially for developers new to Dart
  • Larger app size compared to Vue Native applications
  • Less flexibility in integrating with existing native code

Code Comparison

Vue Native Core:

<template>
  <view>
    <text>Hello, {{ name }}!</text>
  </view>
</template>

<script>
export default {
  data: () => ({ name: 'Vue Native' })
}
</script>

Flutter:

import 'package:flutter/material.dart';

class MyWidget extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Text('Hello, Flutter!');
  }
}

Vue Native Core uses a familiar Vue.js-like syntax with separate template and script sections, making it easier for Vue developers to transition. Flutter, on the other hand, uses Dart and a widget-based approach, which may require more time to learn but offers more control over the UI structure.

Both frameworks provide ways to create cross-platform mobile applications, but Flutter offers better performance and a more mature ecosystem, while Vue Native Core leverages the familiarity of Vue.js for web developers transitioning to mobile development.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

⚠️ This project has been deprecated and is no longer maintained ⚠️

Vue Native

No Maintenance Intended

Visit our website at vue-native.io or read the official documentation here.

Build native mobile apps using Vue

Vue Native is a framework to build cross platform native mobile apps using JavaScript. It is a wrapper around the APIs of React Native. So, with Vue Native, you can do everything that you can do with React Native. With Vue Native, you get

  • The simplicity of Vue.js. Incrementally build user interfaces with the familiar syntax of HTML and CSS in single file components.
  • Seamless interop with React Native. Use core React Native components with Vue.js syntax out of the box to develop mobile apps on both iOS and Android.

Contents

Documentation

You can find the full documentation for Vue Native on this website. It covers installation and setup, component basics, routing, testing, the internal API and more.

The source for the Vue Native documentation and website is hosted on a separate repo, here

Installation

To install Vue Native's official CLI, run

$ npm install vue-native-cli -g

To use the CLI, you must have either expo-cli or react-native-cli installed globally.

Project setup with Vue Native CLI

The Vue Native CLI can be used to easily generate a fully configured Vue Native app. It wraps expo-cli and react-native-cli to generate a simple single page application (SPA) after installing and configuring dependencies from vue-native-core.

You should have either expo-cli or react-native-cli installed as a global dependency. Refer to the installation guide for details on project setup. The GitHub repository for Vue Native CLI is hosted here.

With the CLI, generating a Vue Native project is as easy as running the command

$ vue-native init <projectName>

Using Vue Native in a React Native project

It is possible to integrate Vue Native into a pre-existing React Native project. You can find instructions to do this here.

These instructions can also be used to set up a Vue Native project from scratch.

Available React Native components

All the core components of React Native 0.63 onwards are globally registered and available to use in templates without the need to import and locally register.

The components and their React Native documentation can be found here.

All other components that were previously available, but then deprecated from React Native can still be used by installing their respective packages.

For example, to use WebView, use the react-native-webview package.

Contributors

This project exists thanks to all the people who contribute.

License

MIT

Credits to react-vue

A huge thanks to the author of react-vue for most of the work on Vue Native.

NPM DownloadsLast 30 Days