Skip to content
#

type-safe

Here are 103 public repositories matching this topic...

SwayDB
simerplaha
simerplaha commented Oct 24, 2020

Java configuration functions are mutable.

For example the following setClearAppliedFunctionsOnBoot function is mutable. This function and others should be immutable.

Map<String, Double, PureFunction<String, Double, Apply.Map<Double>>> products =
  PersistentMap
    .functionsOn(Paths.get("my_dir"), stringSerializer(), doubleSerializer(), Arrays.asList(discount))
    .setClear
Shmew
Shmew commented Nov 11, 2019

Finally getting around to playing with Feliz itself more. Noticed a few things that should/could be changed:

Some properties are too strict. For example if I'm using Material-UI and want to set box-shadow I'm not able to set it through boxShadow as the overloads only accept int and int tuples. MaterialUI theme.shadows is an array of strings and the general usage is like this:

Herteby
Herteby commented Oct 24, 2019

For a long time I thought this was impossible to do without writing toString/fromString functions for your custom types, but I just realized that you can make it work by instead using the list index of the options as the "value", and then in the onChange decoder use that index to retrieve the item from the passed in options list.

Here's a demo: https://ellie-app.com/7253Q8THR2xa1

GraphZahl

Improve this page

Add a description, image, and links to the type-safe topic page so that developers can more easily learn about it.

Curate this topic

Add this topic to your repo

To associate your repository with the type-safe topic, visit your repo's landing page and select "manage topics."

Learn more

You can’t perform that action at this time.