Skip to content

Instantly share code, notes, and snippets.

View rajatk16's full-sized avatar
🏠
Working from home

geekrajat rajatk16

🏠
Working from home
View GitHub Profile
import { VueNativeBase } from "native-base";
Vue.use(VueNativeBase);
<template>
<nb-container>
<view>
<nb-text>Hello world</nb-text>
</view>
</nb-container>
</template>
<script>
import { StackNavigator, DrawerNavigator } from "vue-native-router";
const AppNavigation = StackNavigator(
{
Login: { screen: LoginScreen },
Drawer: { screen: Drawer }
},
{
initialRouteName: "Login",
headerMode: "none"
<script>
import { required, email } from 'vuelidate/lib/validators'
export default {
data: function() {
return {
emailValue: '',
password : ''
}
},
validations: {
<nb-form>
<nb-item :error="(!$v.emailValue.required || !$v.emailValue.email ) && $v.emailValue.$dirty">
<nb-input placeholder="Email" v-model="emailValue" auto-capitalize="none" :on-blur="() => $v.emailValue.$touch()"/>
</nb-item>
<nb-item last :error="!$v.password.required && $v.password.$dirty">
<nb-input placeholder="Password" v-model="password" auto-capitalize="none" secure-text-entry :on-blur="() => $v.password.$touch()" />
</nb-item>
</nb-form>
const store = new Vuex.Store({
actions,
mutations,
state: {
activeType: 'posts',
posts: [],
logging_in: false,
userObj: {},
loadingPosts: false
}
<template>
<view>
<nb-list>
<item v-for="(itemType, types) in items" :data="itemType" />
</nb-list>
<view/>
</template>
<script>
import store from "../../store";
export default {
<script>
export default {
data: {
loaded: false
}
created() {
asyncStorage.getItem('email').then((val) => {
if (val) {
this.loaded = true
this.navigation.navigate('Home')
import Html exposing (..)
import Html.Attributes exposing (..)
import Html.Events exposing (onClick, onInput, onSubmit)
type alias Model =
{ email : String
, message : String
, submitting : Bool
}
(function (root) {
const compose = (f, g) => x => f (g (x));
root.helpers = {
compose,
};
}) (window);