Coder Social home page Coder Social logo

buntec / ff4s Goto Github PK

View Code? Open in Web Editor NEW
38.0 38.0 3.0 38.33 MB

A purely functional web UI library for Scala.js

Home Page: https://buntec.github.io/ff4s/

License: Apache License 2.0

Scala 98.29% HTML 0.45% Nix 1.26%
cats-effect frontend functional-programming scala scalajs

ff4s's Issues

question about Store function return type

I was wondering why the store function looks like:

Action => State => (State, Option[F[Unit]])

vs

Action => State => (State, F[Unit])

Since we know that F[_]: Concurrent and Concurrent extends Applicative so we could return F[Unit] via Concurrent[F].unit instead of None.

There is possibly an efficiency motivation, but if there isn't, I think the simpler type signature would be cleaner to use.

please publish scala doc

This looks like a great library that I'm excited to try. One of the reasons I love typed functional programming is that the type signatures are often great documentation.

Would you be willing to publish the scala docs for this library so that we can easily see the types without having to click through the GitHub UI or checking the project out locally?

Thanks for your work on this!

Question about Store name

I'm enjoying using ff4s on a simple UI. I really enjoy programming with cats and pure functional style, so I appreciate your work on this.

I've shown this library to a few people and one place they always trip up is explaining with Store is named what it is. The main thing it seems to be about is the updating logic of (Action, State) => State. Or someone with more FP experience might notice that it something like Action => cats.data.State[State, Option[IO[Unit]]

I don't have a great suggestion for you, but I noticed you are still making incompatible changes, so I thought I would bring the issue up. Something more direct like Update, or maybe TransitionMatrix.

Just thought I would share my feedback.

Types of events

I have some code that looks like this:

        textArea(
          `type` := "text",
          cls := "codein",
          value := text,
          onInput := { te =>
            Some(
              Action.CodeEntered(
                te.currentTarget.asInstanceOf[HTMLTextAreaElement].value
              )
            )
          }
        )

It would be nice if the type of the event allowed me to access the HTMLTextAreaElement without the cast. Maybe it is possible now, but I didn't see how.

Thank you.

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.