funkia / turbine

Purely functional frontend framework for building web applications

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Lists not working in some browsers

stevekrouse opened this issue · comments

While it works in Chrome on my Linux machine, it does not work on Chrome on mobile or Firebox or Chromium on Linux.

import { runComponent, elements as E } from "@funkia/turbine";

// Also fails: runComponent("#mount", E.div(["hi"]));
runComponent("#mount", ["hi"]);

Codesandbox: https://codesandbox.io/s/determined-water-oqv6o?file=/src/index.ts

Error:

Screenshot from 2021-09-08 11-42-08

The problem happens on the codesandboxes in the readme on mobile. For example: https://codesandbox.io/s/xenodochial-williams-xok6q

The issue is related to a bug in isBehavior from hareactive.
See funkia/hareactive#97.

My guess why it still works on your linux machine, is because the chrome version is older than 92, where they introduced a new method on arrays which causes the issue.

Ah amazing! Glad you have a fix almost ready. When do you expect it to land? Or do you have a suggested workaround?

I'm working on getting a development environment setup so I can make this fix myself but I'm unable to find a way to get npm to use my local version of hareactive/turbine instead of that from the npm registry. Am I missing a build step or something?

Ideally, I want it to auto-reload changes from these dependencies on save, if possible. How do you advise a setting up development environment for hacking on hareactive and turbine?

For context, I'm working on gitpod.io instead of locally -- if that helps. (Easier to collaborate)

After a 2 hours I was able to get local dependencies working! The issue was that I was on node v14.18.3 which seems to require turbine/node_modules/hareactive/dom/package.json to exist, which it does in the npm package but not when you build it locally. I was able to fix the issue by either downgrading node to v12.18.3 or by adding that file to the symlinked hareactive directory. This should probably be its own github issue under hareactive or turbine (if it isn't already), yes?