Giter Site home page Giter Site logo

Comments (6)

ryantrinkle avatar ryantrinkle commented on May 18, 2024

Hi @ariep; it would be great to see the full example.

from reflex-dom.

ariep avatar ariep commented on May 18, 2024

This example illustrates the problem: key presses in the input field do not change the texts.

module Main where
import Reflex.Dom
main :: IO ()
main = mainWidget $ do
  t <- textInput def
  let newItemE = fmap show $ _textInput_keypress t
  el "div" $ do
    dItem <- holdDyn Nothing $ fmap Just newItemE
    dText <- mapDyn show dItem
    dynText dText
  items <- foldDyn (++) "Items:" newItemE
  -- items <- holdDyn "Items: " $ fmap show newItemE
  dynText items
  return ()

It is minimal in the sense that either
• commenting out the 4 lines of the el "div" do-block; or
• swapping in the other definition of items
fixes it.

from reflex-dom.

ryantrinkle avatar ryantrinkle commented on May 18, 2024

That example works for me on the develop branch of try-reflex, in both ghci and ghcjs. The hamishmack-master branch and ghcjs 0.2 haven't been tested with reflex-dom, yet - and it looks as though you may have found an issue with them. Is it possible for you to switch to the develop branch?

from reflex-dom.

luigy avatar luigy commented on May 18, 2024

That example works fine for me on ghcjs-0.2(compiled from Oct 1). Maybe your compiled ghcjs has a broken base or shims

from reflex-dom.

ariep avatar ariep commented on May 18, 2024

@luigy I installed a new ghcjs today from git master, and it works now. Thanks!

This is still with the reflex-dom from k0001's repo, because current develop of reflex-dom needs ghcjs-dom < 0.2, but that does not compile with recent ghcjs.

@ryantrinkle I don't feel inclined to downgrade ghcjs, especially given the fact that apparently major bugs are still being fixed (even if older versions of reflex-dom did not trip it up).

from reflex-dom.

ryantrinkle avatar ryantrinkle commented on May 18, 2024

@ariep Glad your issues were resolved! Thanks for the update!

from reflex-dom.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.