GithubHelp home page GithubHelp logo

Comments (15)

oxyii avatar oxyii commented on June 8, 2024 1

@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

Выделение_001

from react-native-web-swiper.

oxyii avatar oxyii commented on June 8, 2024 1

@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.

oxyii avatar oxyii commented on June 8, 2024

@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.

ehabdevel avatar ehabdevel commented on June 8, 2024

@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.

oxyii avatar oxyii commented on June 8, 2024

@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.

ehabdevel avatar ehabdevel commented on June 8, 2024

@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.

ehabdevel avatar ehabdevel commented on June 8, 2024

I just copy past the example what exist in the Readme file

from react-native-web-swiper.

oxyii avatar oxyii commented on June 8, 2024

@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.

ehabdevel avatar ehabdevel commented on June 8, 2024

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.

ehabdevel avatar ehabdevel commented on June 8, 2024

here is the repo https://github.com/ehabdevel/swipertest

from react-native-web-swiper.

oxyii avatar oxyii commented on June 8, 2024

@ehabdevel Nope. Cannot reproduce. Console is clean

Выделение_001

from react-native-web-swiper.

oxyii avatar oxyii commented on June 8, 2024

@ehabdevel It's repo without swiper. I asked repo with code to reproduce.

from react-native-web-swiper.

ehabdevel avatar ehabdevel commented on June 8, 2024

Yes updated, and I even tried to copy the file outside the component screen.js

from react-native-web-swiper.

ehabdevel avatar ehabdevel commented on June 8, 2024

swip2

from react-native-web-swiper.

ehabdevel avatar ehabdevel commented on June 8, 2024

Many thanks for your help.

from react-native-web-swiper.

Related Issues (20)

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.