Skip to content

Unstable component "Picker" from react native #132

@guilhermedotcamargo

Description

@guilhermedotcamargo

Problem

Using Picker, component from react-native, the data binding fails sometimes (no one error)

App.vue

<template>
  <view class="container">
    <text class="text-color-primary">My Vue Native App</text>
    <Picker
      :selectedValue="selected"
      :onValueChange="val => {selected = val}"
    >
      <Item label="-- Selecione" value="" />
      <Item label="Java" value="java" />
      <Item label="JavaScript" value="js" />
    </Picker>
    <text> >> selected: {{ selected }}</text>
  </view>
</template>

<script>
import React from 'react';
import { Picker } from 'react-native';

export default {
  components: { Picker, Item: Picker.Item },
  data () {
    return {
      selected: ''
    }
  }
}
</script>

 
<style>
.container {
  padding: 10px;
  /* background-color: white; */
  /* align-items: center; */
  /* justify-content: center; */
  /* flex: 1; */
}
.text-color-primary {
  color: blue;
}
</style>

Behavior

Peek 2019-03-09 18-19

Env

OS

Distributor ID: Ubuntu
Description: Ubuntu 18.04.2 LTS
Release: 18.04
Codename: bionic

Project (using vue-native-cli)

{
"dependencies": {
    "expo": "^32.0.0",
    "react": "16.5.0",
    "react-native": "https://github.com/expo/react-native/archive/sdk-32.0.0.tar.gz",
    "vue-native-core": "0.0.8",
    "vue-native-helper": "0.0.10"
  },
  "devDependencies": {
    "@babel/core": "^7.0.0-0",
    "babel-preset-expo": "^5.0.0",
    "vue-native-scripts": "0.0.14"
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions