Giter Club home page Giter Club logo

Comments (2)

kidjp85 avatar kidjp85 commented on August 27, 2024

Hi @krustina , you can try with demo repo, I will have a look when I have time and push this to demo

from react-id-swiper.

krustina avatar krustina commented on August 27, 2024

ok i have tried something else, where now im working in ES6.. here is my error and my code:
error:

Error in ../~/react-id-swiper/lib/index.js
Module not found: 'react' in [my directory]/node_modules/react-id-swiper/lib

@ ../~/react-id-swiper/lib/index.js 9:13-29

my code:

import React, { Component } from 'react';
import Swiper from 'react-id-swiper';
import './App.css';

class Mobile extends Component {
    render() {
        const vParams = {
            direction: 'vertical',
            pagination: '.swiper-pagination-v',
            paginationClickable: true,
            keyboardControl: true,
            nextButton: '.arrow-down',
            mousewheelControl: false
        }
        const hParams = {
            direction: 'horizontal',
            pagination: '.swiper-pagination-h',
            paginationClickable: true,
            spaceBetween: 50,
            keyboardControl: true,
            nextButton: '.swiper-button-next',
            prevButton: '.swiper-button-prev',
            mousewheelControl: false
        }
        return (
            <div className="mobile">
                <Swiper {...vParams}>
                    <div className="swiper-slide">
                        <div className="main-container">
                            <div className="content">
                               ...
                            </div>
                        </div>
                    </div>

                    {/*nested swiper*/}
                    <div className="swiper-slide">
                        <Swiper {...hParams}>
                            <div className="swiper-slide">
                                <div className="main-container">
                                    ...
                                </div>
                            </div>
                            <div className="swiper-slide">
                                <div className="main-container">
                                    ...
                                </div>
                            </div>
                            <div className="swiper-slide">
                                <div className="main-container">
                                    ...
                                </div>
                            </div>
                            <div className="swiper-slide">
                                <div className="main-container">
                                    ...
                                </div>
                            </div>
                        </Swiper>
                    </div>
                    <div className="swiper-slide">
                        <div className="main-container">
                            ...
                        </div>
                    </div>
                </Swiper>
            </div>
    );

    }
}

export default Mobile;

I think it might be because the react-id-swiper index.js/lib is in ES5? Maybe im missing something?

from react-id-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.