yyx990803 / vue-hooks

Experimental React hooks implementation in Vue

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Live demo doens't work in Firefox

Justineo opened this issue · comments

Counter value and window width are not updating.

Firefox 63.0 on macOS High Sierra

working for me.

Not working for me. Firefox version is 63, running on Ubuntu. Chrome works as expected.

Same for me. Not working on Firefox version 63.0 64-bit version on Windows 10 64-bit.

I think it has to do with Firefox not supporting dynamic imports https://caniuse.com/#feat=es6-module-dynamic-import

What works for me, at least with the first example, is to replace the import('./index.js').then... line with:

import { withHooks, useState, useEffect } from './index.js'

and remove the closing bracket + brace at the end of the script.

@tjFogarty

The live demo on CodeSandbox is not using dynamic imports:

import { withHooks, useState, useEffect } from "vue-hooks";

Sorry @Justineo I was running the examples from the repo. Can confirm the same issue on 63.0 (64-bit) OSX.

However, running the live demo code locally works fine. I wonder if it's a Codesandbox issue.