Comments (15)
@ehabdevel On your last screenshot I don't see errors in console. All works fine I think.
About white screen. Look: All your DOM-tree have {flex:1}
style but your react root tag is with no styles. It means empty tag have no height! You need to set height of root tag. Add styles below into <head>
tag of public/index.html
<style>
html, body {
height: 100%;
}
body {
overflow: hidden;
}
#root {
display: flex;
height: 100%;
}
</style>
that's not all
it is new app created with npx create-react-app
This is not a best way to create react-native app. Follow instructions from official RN docs then install deps following instructions on RNWeb docs.
All works fine, I close this issue. Screenshot below - it's your repo with styles definitions above
from react-native-web-swiper.
@ehabdevel Or you can use CRNWA as alternate. But anyway don't forget to add <style>
to html. Good luck!
from react-native-web-swiper.
@ehabdevel Thanks for your report.
How to reproduce it? Can you share your sources? The fact is that the swiper does not use onStartShouldSetPanResponder
in PanResponder
object.
from react-native-web-swiper.
@oxyii here is my package.json
{
"version": "0.1.0",
"private": true,
"main": "./App.js",
"dependencies": {
"expo": "^32.0.6",
"react": "^16.8.4",
"react-art": "^16.8.4",
"react-dom": "^16.8.4",
"react-native": "^0.59.1",
"react-native-web": "^0.11.1",
"react-native-web-swiper": "^1.10.0",
"react-scripts": "2.1.8"
},
"scripts": {
"start-web": "react-scripts start",
"build-web": "react-scripts build",
"test-web": "react-scripts test",
"eject-web": "react-scripts eject",
"start-native": "expo start",
"android": "expo android",
"ios": "expo ios",
"build:ios": "expo build:ios",
"build:android": "expo build:android"
},
"eslintConfig": {
"extends": "react-app"
},
"browserslist": [
">0.2%",
"not dead",
"not ie <= 11",
"not op_mini all"
],
"devDependencies": {
"babel-plugin-module-resolver": "^3.2.0",
"babel-plugin-transform-object-rest-spread": "^6.26.0",
"babel-plugin-transform-react-jsx-source": "^6.22.0",
"babel-preset-expo": "^5.1.1"
}
}
from react-native-web-swiper.
@ehabdevel No. Please share file contents where swiper includes. I think you trying to include some PanResponder
into some slide....
from react-native-web-swiper.
@oxyii it is new app created with npx create-react-app
Here is my App.js file:
import React from "react";
import { AppRegistry, StyleSheet, View } from "react-native";
import Screen from "./component/screen";
class App extends React.Component {
render() {
return (
// I do no this part is not appear here in the as component I will write it without closing brackets if it may //appear
<View style={styles.appContainer}
<Screen /
</View
// till here. I think now it appear
);
}
}
const styles = StyleSheet.create({
appContainer: {
flex: 1
}
});
AppRegistry.registerComponent("App", () => App);
export default App;
And here is the file where swiper is:
import React from "react";
import { View, Text, StyleSheet } from "react-native";
import Swiper from "react-native-web-swiper";
const styles = StyleSheet.create({
container: {
flex: 1
},
slideContainer: {
flex: 1,
alignItems: "center",
justifyContent: "center"
},
slide1: {
backgroundColor: "rgba(20,20,200,0.3)"
},
slide2: {
backgroundColor: "rgba(20,200,20,0.3)"
},
slide3: {
backgroundColor: "rgba(200,20,20,0.3)"
}
});
export default class Screen extends React.Component {
render() {
return (
<View style={[styles.slideContainer, styles.slide1]}>
Slide 1
<View style={[styles.slideContainer, styles.slide2]}>
Slide 2
<View style={[styles.slideContainer, styles.slide3]}>
Slide 3
);
}
}
from react-native-web-swiper.
I just copy past the example what exist in the Readme file
from react-native-web-swiper.
@ehabdevel Please use markdown for code sharing or do you have the repo (with minimal code to reproduce the issue) that can you share?
from react-native-web-swiper.
Ok, but if you say that the swiper does not use onStartShouldSetPanResponder in PanResponder object.
So I this message may belong to the ( React Developer Tools ) Extensions for google chrome.
at beginning when I run it (npm run start-web) it does not show anything in the console or in the page but when I try to investigate with React Developer Tools It shows this message in the console.
from react-native-web-swiper.
here is the repo https://github.com/ehabdevel/swipertest
from react-native-web-swiper.
@ehabdevel Nope. Cannot reproduce. Console is clean
from react-native-web-swiper.
@ehabdevel It's repo without swiper. I asked repo with code to reproduce.
from react-native-web-swiper.
Yes updated, and I even tried to copy the file outside the component screen.js
from react-native-web-swiper.
from react-native-web-swiper.
Many thanks for your help.
from react-native-web-swiper.
Related Issues (20)
- Expo Video Component (expo-av) Doesn't fully render in Swiper
- Swiper slider only show when I set hieght for parent view of this.
- Animations
- Even if image state is removed, it is visible in the swiper.
- swiper arrows web
- in iOS ScrollView inside swiper conflict scroll! HOT 7
- Multiple elements HOT 3
- gesturesEnabled problem disable swiper HOT 1
- [Help needed] Rerender different sets of children HOT 1
- Safari Mobile iOS 12, width and height are always equal to 0 HOT 1
- Bouces disable? HOT 7
- Possible to add slides dynamically? HOT 6
- Not displaying in React Native Web HOT 2
- Allow `React.Component`s to be functional components (TypeScript) HOT 4
- Swiper Doesnt Render Anything HOT 4
- Warning: Failed prop type: DefaultControls: prop type `cellsStyle.top-left`
- Fade transition HOT 2
- Issue and Fix: Components not getting prop updates HOT 1
- swipe is not working in android HOT 1
- Disable spring animation.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-web-swiper.