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
Dependency Errors When Building (Android) #1
Comments
Hey! Well... to be honest, the library isn't ready to use (and is not in pre-release at all 😅 ). It doesn't even look like an android library but more of an android project. In fact, only the code inside the library is working: it's the code taken from a project I've been working on. This repo is merely a copy / paste of the existing code that we've produced (and that worked) inside our application. So if you want to use this lib (which is not one for now), you'd better copy the code or contribute and help me to make this work on android / ios as an external dependency. Since I'm a web developer, I'm not used to the android / ios ecosystem. Language is the easy part of the job 😝 I hope this help you just a little 😅 |
Ah that's totally fair! I feel you on that one. No worries at all. I'd love to see this project flourish and I'm sure that someone in the development community who has experience packaging React Native modules will contribute something. Currently we're just hacking view position: absolutes to achieve the same effect. 😅 |
I m going to make some effort making it a real library 😄 . Leave me some time 😃 |
So here are the news: I've been working on it a little today and I've managed to create a branch https://github.com/mfrachet/rn-reparentable/tree/moving-to-lib where teleportation works on android only. You can use the github url as a npm dependency for testing purpose if you'd like to. Here's a really simple app that shows teleportation on the native side: /**
* Sample React Native App
* https://github.com/facebook/react-native
*
* @format
* @flow
*/
import React, { Component } from "react";
import { StyleSheet, Text, View } from "react-native";
import { PortalOrigin, PortalDestination } from "rn-native-portals";
export default class App extends Component {
constructor(props) {
super(props);
this.state = { go: false };
}
componentDidMount() {
setInterval(() => {
this.setState({ go: !this.state.go });
}, 2000);
}
render() {
return (
<View style={styles.container}>
<View style={styles.destination}>
<PortalDestination name="go" style={{ height: 50 }} />
</View>
<View style={styles.source}>
<PortalOrigin destination={this.state.go ? "go" : null}>
<View style={styles.green}>
<Text>Source</Text>
</View>
</PortalOrigin>
</View>
</View>
);
}
}
const styles = StyleSheet.create({
green: {
backgroundColor: "green",
padding: 10
},
source: {
backgroundColor: "blue",
flex: 1,
height: 70
},
destination: {
backgroundColor: "red",
flex: 1,
height: 70
},
container: {
flex: 1
}
}); |
Let me know if I can close this issue 😊 |
Hi! Is this library ready to use? |
Nop (in readme: This repository hasn't been published yet, I need some help to expose the native component to JS) |
What kind help? Can you explain detaily? Maybe I can help. |
Well, I've implemented the swift part but since react native doesn't support swift by default, I need some Obj-C wrappers and I don't know how to write them. If you're interested to contribute 😊 |
Hi best regards |
@marabej maybe try to have the seek value and set it after teleportation ? |
Hi |
Can you share your other way ? I'm really interested :) |
Hi |
Oh ok, for my own, i used react-native-portal like this: At root level (
The
And my
|
I don't know if this bug also applies to trying to build on iOS, because I don't have an iOS device to test on.
I can't work out how to get Reparentable to install properly/build! I know the module is pre-release, but I'm guessing you're running it somewhere where it works :P When I run
react-native run android
, I receive errors such as:I'm installing rn-reparentable by
npm install --save https://github.com/mfrachet/rn-reparentable
(hack, I know). I'm not usingyarn
because of project requirements.I can solve the initial issue by cd-ing to the project's root and running
npm install
to grab its dependencies. However, I am then unable to build for development:The text was updated successfully, but these errors were encountered: