Animation not fluid with ReactCSSTransitionGroup

Currently, I am in the process of developing an image carousel that showcases images moving smoothly from right to left. However, despite its functionality, there seems to be a slight jaggedness in the animation that I can't seem to resolve. Interestingly, when I tested the carousel on a fiddle, it performed better compared to my actual site. I suspect that the dimensions of the images might be causing this issue. For further details and to view the fiddle, please visit here.

React code

    const ReactCSSTransitionGroup = React.addons.CSSTransitionGroup;

    const ImageArray = ["https://media-cdn.tripadvisor.com/media/photo-s/09/c7/bc/96/the-bull-ring-arena.jpg", "https://media-cdn.tripadvisor.com/media/photo-s/0d/0a/cb/5d/the-bull-ring-arena-ext.jpg"];

    class CarouselImage extends React.Component{

     componentDidMount(){

     }

     render(){
         return (
            <div className="all-detail-images">
             <img  ref="bull" className="blurred-background" src={this.props.src} alt="detail image"/>
             <img  ref="bullRing" className="detail-image-style" src={this.props.src} alt="detail image"/>
            </div>

         )
     }
    }

    class Carousel extends React.Component{

     constructor(props) {
        super(props);
        this.state = {position: 0};
      }

     componentDidMount(){
       setInterval( () => {
         if(this.state.position){
           this.setState({position: 0});
         }else{
             this.setState({position: 1});
         }

       },6000);

      }

     render(){
       return (
        <div className="image-gallery-div">
          <ReactCSSTransitionGroup transitionName="carousel-image"
                                   transitionLeaveTimeout={1000}
                                   transitionEnterTimeout={1000}>

           <CarouselImage src={ImageArray[this.state.position]} key={this.state.position}/>

         </ReactCSSTransitionGroup>
           </div>
       )
     }
    }

         class HelloWidget extends React.Component{
           constructor(props) {
             super(props);
             this.handleChange = this.handleChange.bind(this)
             this.state = {
                   name: ''
             };
           }

           handleChange(e) {
             this.setState({
               name: e.target.value
             });
           }

           render() {
               return <div className="max-width-carousel">
                   <Carousel /> </div>;
           }
         }

         React.render(<HelloWidget />, document.getElementById('container'));

CSS

 .max-width-carousel{
      width: 100%;
      max-width: 100%;
      overflow: hidden;
      height: 75vh;
    }

    .all-detail-images{
      z-index: 0;
      width: 100%;
      height: 75vh;
      position: relative;
      overflow: hidden;
      float: left;
    }

    .blurred-background{
        filter:blur(3px);
        width: 100%;
        height: 100%;
    }


    .image-gallery-div{
      top: 0;
      width: 100%;
      text-align: center;
      overflow: hidden;
    }

    .detail-image-style{
      height : 75vh;
      max-width: 100%;
      position: absolute;
      z-index: 5;
      left: 0;
      right: 0;
      margin: auto;
    }



      .carousel-image-enter {
       margin-left: 100%;
      }

      .carousel-image-enter.carousel-image-enter-active {
         margin-left: 0%;
         transition: all 1s linear;
      }

      .carousel-image-leave {
        position: absolute;
        top:0;
        left:0;
      }

      .carousel-image-leave.carousel-image-leave-active {
         transition: all 1s linear;
         left: -100%;
      }

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

How can I incorporate an error page into this Express application?

I'm currently working on an express application that simulates a basic version of Twitter. One feature I'm trying to implement is an error page. This way, if there are any issues with the routing, users will see a friendly message instead of a g ...

Use the row().data function with the datatables.net plug-in to fetch data from a specific column in a

UPDATE: Removed my video on YouTube, but here is a straightforward solution: $(document).on('click', '.edit_btn', function() { var rowData = $('#example').DataTable().row($(this).parents('tr')).data(); }); "Funct ...

Choosing an array from the MongoDB database

{ "_id": "4f609932615a935c18r000000", "participants": [ { "user_name": "john1", "role": "user", "created_at": { "sec": 1331730738, "usec": 810000 }, { "user_name": "john2", "role": ...

"Error: React dotenv is unable to access the .env configuration file

My React and Node project has a .env file in the root directory, along with other important files like .eslint and .gitignore. The .env file contains 6 lines of code such as APIKEY=aeofiunoief, without any special symbols. Within the src/ directory, there ...

SVG to create a gradient mask that appears transparent

I require assistance with working on svg's. I have a "background image" with another "image" layered over it. The "image" needs to have a hole cut out of it so that the background image can shine through. I managed to achieve this by utilizing svg: ...

Differentiate among comparable values through placement regex

I'm currently tackling a challenge involving regex as I work on breaking down shorthand CSS code for the font property. Here is my progress thus far: var style = decl.val.match(/\s*(?:\s*(normal|italic|oblique)){1}/i); style = style ? style ...

I am struggling to set a required input in Angular2

I am new to Angular and currently working on a project that requires input validation to ensure that no field is left blank. The project consists of an HTML file along with a .ts file for functionality. Below is a snippet from the HTML: <div class="f ...

Why is my CSS not recognizing the animation I specified for it to play?

I can't seem to get the simple animation I added to my code working properly. <div class="phone-center"> <div class="phone"> </div> </div> .phone-center { display: flex; justify-content: ce ...

Utilize the synchronization feature of ES6 Promises in Jasmine with the then/catch method

I have an angular controller that needs to be tested. This controller utilizes a service to fetch data from a server, and the service returns ES6 Promises. function MyController($scope, MyService) { $scope.doSomething = function () { MyService.foo() ...

Having an issue with Next.js dynamic links using catch-all feature ([[...slug]]) not functioning properly when the "as" prop is used in the Link component

I have been developing a Next.js application where certain pages include in-page routes. To handle this, I have implemented a catch-all (i.e. [[...slug]]) route and managed the routing on the page itself. Here is how my folder structure looks: While these ...

Can you explain the significance of the regular expression in a dojo configuration file named dj

As I was working on developing dojo application modules, I came across a regular expression in tutorials. var pathRegex = new RegExp(/\/[^\/]+$/); var locationPath = location.pathname.replace(pathRegex, ''); var dojoConfig = { asyn ...

Issue: Unable to convert a value of undefined or null to an object | NextAuth

Attempting to create a custom sign-in page with Google using NextAuth and Firebase led to the following code: api/auth/[...nextauth]/route.js ...

Insert a design layout into a text entry box

Currently developing an application with AngularJS and seeking a solution for adding a "template" to an HTML input field similar to a placeholder. Specifically, I have a date-field requiring user input in the format of dd/MM/yyyy or through a datepicker se ...

Instructions for adding username/password authentication using Express ntlm

Attempting to set up username and password authentication using Express-ntlm. I've included the following code as middleware: app.use( ntlm({ domain: '<domainname>', domaincontroller: '<ldap url>', })); I haven't ...

Is there a way to insert copied links onto separate lines?

I have a list of links to Google search results. I have a checker that allows me to mark the links and copy them. My code is functioning properly, but I want each link to appear on a new line. ... Can someone please help me? I've attempted to add "< ...

generating a dynamic tree structure with JSON by leveraging a database

It was brought to my attention that I am facing a unique challenge: I am trying to generate a JSON tree using Java/JavaScript with data sourced from a MySQL Database. I have not been able to locate the appropriate documentation for this task Any assistan ...

Arrange a cluster of CSS table cells onto a fresh line

Currently, I am exploring CSS properties to create the visual appearance of a table using two levels of DOM elements. The highest-level element wraps around its child elements, which are styled to resemble a flat list. For example: <div class="t"> ...

What is the essential Angular 2 script that must be included for a simple Angular 2 application to function properly?

I'm currently working through the latest Tuts+ tutorial on Angular 2 In the tutorial, the author references adding this script: <script src="node_modules/angular2/bundles/angular2.sfx.dev.js"></script> However, in the most recent beta re ...

Is there a way to set up a linked component's peerDependencies to utilize the corresponding node_modules of the linked script?

I am currently utilizing npm version 3, which is pertinent due to the changes in the behavior of peerDependencies in this version. In my project, I have a reactjs app named "game" along with a reactjs component named "player". The "game" app is being run u ...

React - Encountered a compressed error

Currently, I have React JS installed through NPM and am utilizing browserify to handle components in React. Whenever there is an exception in React, the console displays this message: "Uncaught Error: Minified exception occurred; use the non-minified de ...