1

I have JavaScript library which i using in Cordova applications.

Library create drawer with HTML/JS/CSS and drag events.

https://github.com/roman-rr/cupertino-pane

I want use this library/code in React Native.

Is there any simple ways to convert html/js into react component + some logic ? Can i use some type of bridge and same package ?

1 Answer 1

1

HTML elements require browser environment to run and react-native requires the native component to load on the respective native platform so you can't use HTML elements directly in react-native app. I have looked at your provided URL and it requires browser environment so you can't use it but here is a replacement for this component is react-native

https://github.com/jeremybarbet/react-native-modalize

You can use JS logic for making calculations you but can't use UI So you have to use native component plus CSS that you have, It requires small changes too or you can use Styled-component if you don't want to make many changes with CSS

https://styled-components.com/docs/basics#react-native

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.