-
Notifications
You must be signed in to change notification settings - Fork 297
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
Can we use other UI framework? #188
Comments
Hi @alighasemzadeh, yes, you can. I'm currently using a mix of the Vue Native basic components (which are really just wrappers around React Native components), Native Base components, components from React Native Elements and other individual components. So far, I have found that anything that can be used in React Native can also be used with Vue Native, although usually with some translation of the syntax into what Vue / Vue Native expects. |
@RohanTalip |
@alighasemzadeh, you're welcome.
I'm assuming that you want to use Vuetify for your website / web app. I don't see any problem with that. I suspect you will need to have 2 source trees for each app (although you will likely have similar code shared or copied between them).
I am not using expo, but there appear to be other people using it with Vue Native. You could start by looking at the documentation for device APIs or search for what you want on your favourite search engine or join the Vue Native Slack community and ask your question there. Good luck! |
You're doing a great job @RohanTalip. Loads of love ❤️ from the Vue Native Team at GeekyAnts |
Hi! I'm trying to use Material Design with Vue Native, but I' getting an error when trying to import and Vue.use(MdMenu):
Any possible solutions on this? |
Hi @Syltis, First of all, the Vue Material project that you linked to provides web UI components, which won't make sense in a Vue Native / React Native mobile development environment (unless you're using the web UI components in a WebView). Secondly, Vue Native started with a Vue.js core but modified it to act as a bridge between Vue Single File Components (SFCs) and React Native libraries (actually, the SFCs are translated into React Native code). As a result, in a Vue Native project, by default you will no longer import Vue from "vue" but instead from "vue-native-core", and the "vue" module will not be available in your node_modules directory (unless you add it yourself). To find Material Design libraries or components that will work with Vue Native, I recommend searching for "react native material design" (or similar) on your favourite search engine. Some libraries/packages I have come across (but don't yet have experience with) include: There may be others ... |
@RohanTalip |
To summarise, it is possible to use components from React Native component libraries by importing and then declaring them as a child component int the <template>
<view>
<!-- notice the kebab-case, although you can use PascalCase as well -->
<some-ui-component />
</view>
</template>
<script>
// Import the same way as you would in a JS file
import { SomeUiComponent } from 'a-ui-library'
export default {
components: {
// Declare the component here. It can't be used otherwise
SomeUiComponent,
},
/* data, props, methods, etc */
}
</script> Components provided by However, it is not possible to directly use web UI library components, including libraries designed for Vue.js. |
What about the dot notation in react native ui libs as Paper ? Can't figure out how to import and use those components ...
|
@obitux this should work:
|
Hello,
Can I use other UI framework to build application?
The text was updated successfully, but these errors were encountered: