Skip to content

Instantly share code, notes, and snippets.

View lauterry's full-sized avatar

LAU Thierry lauterry

View GitHub Profile
'use strict';
import Carousel from '../src/carousel';
import React from 'react';
import ReactDom from 'react-dom';
import Modal from 'react-modal';
window.React = React;
const App = React.createClass({
@lauterry
lauterry / app.js
Last active August 10, 2016 22:53
nuka-carousel + react-modal = :( - workaround - https://github.com/kenwheeler/nuka-carousel/issues/120
'use strict';
import Carousel from "../src/carousel";
import React from "react";
import ReactDom from "react-dom";
import Modal from "react-modal";
window.React = React;
const App = React.createClass({
@lauterry
lauterry / app.js
Created October 19, 2017 14:28
Handle Lazy Loading with Nuka Carousel
class PhotoCarousel extends React.Component {
constructor() {
super();
this.state = {
currentSlideIndex: 0 // track the index of the current slide
};
this.handleAfterSlide = this.handleAfterSlide.bind(this);
}