Code Monkey home page Code Monkey logo

paper's Issues

How to use useRef

The problem

When trying using useRef in a Paper.TextInput the rescript throws This has type: React.ref<Js.Nullable.t<'a>> Somewhere wanted: Js.Nullable.t<'b> => unit

How to reproduce

Steps to reproduce:

  1. Define a ref with useRef:
let inputRef = React.useRef(Js.Nullable.null)
  1. Use the ref in a TextInput component:
<Paper.TextInput
  ref=inputRef
  mode=#outlined
/>

Expected behavior

Expect to compiler compile to use the ref

Actual behavior

The compiler throws: This has type: React.ref<Js.Nullable.t<'a>> Somewhere wanted: Js.Nullable.t<'b> => unit

image

Environment

PopOS 20.04
expo 40.0
react 17.0.1
react native 0.63.4
rescript 9.1.4
rescript-react-native 0.64.3
react-native-paper 4.4.1
@rescript-react-native/paper 3.0.6

Error: Unable to resolve module react-native-paper

The problem

After create basic app with rescript-react-native I install this lib, but after compile the file App.res to App.bs.js is used the lib react-native-paper but not found this lib and crash app.

How to reproduce

Steps to reproduce:

  1. create app with rescript-react-native
  2. install lib follow doc
  3. compile app
  4. start app in mobile android

Expected behavior

After compile lib the react-native find the react-native-paper or use the react-native-paper from bind rescript

Actual behavior

Crash app because no found react-native-paper lib.

Environment

libs install:

  "@rescript-react-native/paper": "^3.0.6",
  "@rescript/react": "^0.10.0",
  "react": "17.0.1",
  "react-native": "0.64.0",
  "rescript-react-native": "^0.64.3"

running in emulator android API_30

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.