glidejs

Install Glide.js in Rails 6 with Webpack

北战南征 提交于 2020-05-28 04:29:27
问题 I created a new Rails 6 project and I'm trying to install the third party javascript library Glide.js via Webpack. However, it seems like I'm missing a crucial step because it's not working. What I've done so far: Install Glide.js with yarn: yarn add @glidejs/glide Require Glide.js in /app/javascript/packs/application.js : require("jquery") require("@glidejs/glide") require("@rails/ujs").start() require("turbolinks").start() require("@rails/activestorage").start() require("channels") import

GlideJS - Weird behavior when using slide with React Components

て烟熏妆下的殇ゞ 提交于 2020-01-22 02:32:14
问题 I'm using GlideJS with a React Project, but it's returning a strange behavior. The components are not showing one per view and the width of them is changed. The Component: import React, { Component } from "react"; import Glide from "@glidejs/glide"; export default class SliderGlide extends Component { state = { id: null }; componentDidMount = () => { // Generated random id this.setState( { id: `glide-${Math.ceil(Math.random() * 100)}` }, this.initializeGlider ); }; initializeGlider = () => {