https://kotlinlang.org logo
Join the conversationJoin Slack
Channels
100daysofcode
100daysofkotlin
100daysofkotlin-2021
advent-of-code
aem
ai
alexa
algeria
algolialibraries
amsterdam
android
android-architecture
android-databinding
android-studio
androidgithubprojects
androidthings
androidx
androidx-xprocessing
anime
anko
announcements
apollo-kotlin
appintro
arabic
argentina
arkenv
arksemdevteam
armenia
arrow
arrow-contributors
arrow-meta
ass
atlanta
atm17
atrium
austin
australia
austria
awesome-kotlin
ballast
bangladesh
barcelona
bayarea
bazel
beepiz-libraries
belgium
berlin
big-data
books
boston
brazil
brikk
budapest
build
build-tools
bulgaria
bydgoszcz
cambodia
canada
carrat
carrat-dev
carrat-feed
chicago
chile
china
chucker
cincinnati-user-group
cli
clikt
cloudfoundry
cn
cobalt
code-coverage
codeforces
codemash-precompiler
codereview
codingame
codingconventions
coimbatore
collaborations
colombia
colorado
communities
competitive-programming
competitivecoding
compiler
compose
compose-android
compose-desktop
compose-hiring
compose-ios
compose-mp
compose-ui-showcase
compose-wear
compose-web
connect-audit-events
corda
cork
coroutines
couchbase
coursera
croatia
cryptography
cscenter-course-2016
cucumber-bdd
cyprus
czech
dagger
data2viz
databinding
datascience
dckotlin
debugging
decompose
decouple
denmark
deprecated
detekt
detekt-hint
dev-core
dfw
docs-revamped
dokka
domain-driven-design
doodle
dsl
dublin
dutch
eap
eclipse
ecuador
edinburgh
education
effective-kotlin
effectivekotlin
emacs
embedded-kotlin
estatik
event21-community-content
events
exposed
failgood
fb-internal-demo
feed
firebase
flow
fluid-libraries
forkhandles
forum
fosdem
fp-in-kotlin
framework-elide
freenode
french
fritz2
fuchsia
functional
funktionale
gamedev
ge-kotlin
general-advice
georgia
geospatial
german-lang
getting-started
github-workflows-kt
glance
godot-kotlin
google-io
gradle
graphic
graphkool
graphql
graphql-kotlin
graviton-browser
greece
grpc
gsoc
gui
hackathons
hacktoberfest
hamburg
hamkrest
helios
helsinki
hexagon
hibernate
hikari-cp
hire-me
hiring
hongkong
hoplite
http4k
hungary
hyderabad
image-processing
india
indonesia
inkremental
intellij
intellij-plugins
intellij-tricks
internships
introduce-yourself
io
ios
iran
israel
istanbulcoders
italian
jackson-kotlin
jadx
japanese
jasync-sql
java-to-kotlin-refactoring
javadevelopers
javafx
javalin
javascript
jdbi
jhipster-kotlin
jobsworldwide
jpa
jshdq
juul-libraries
jvm-ir-backend-feedback
jxadapter
k2-early-adopters
kaal
kafka
kakao
kalasim
kapt
karachi
karg
karlsruhe
kash_shell
kaskade
kbuild
kdbc
kgen-doc-tools
kgraphql
kinta
klaxon
klock
kloudformation
kmdc
kmm-español
kmongo
knbt
knote
koalaql
koans
kobalt
kobweb
kodein
kodex
kohesive
koin
koin-dev
komapper
kondor-json
kong
kontent
kontributors
korau
korean
korge
korim
korio
korlibs
korte
kotest
kotest-contributors
kotless
kotlick
kotlin-asia
kotlin-beam
kotlin-by-example
kotlin-csv
kotlin-data-storage
kotlin-foundation
kotlin-fuel
kotlin-in-action
kotlin-inject
kotlin-latam
kotlin-logging
kotlin-multiplatform-contest
kotlin-mumbai
kotlin-native
kotlin-pakistan
kotlin-plugin
kotlin-pune
kotlin-roadmap
kotlin-samples
kotlin-sap
kotlin-serbia
kotlin-spark
kotlin-szeged
kotlin-website
kotlinacademy
kotlinbot
kotlinconf
kotlindl
kotlinforbeginners
kotlingforbeginners
kotlinlondon
kotlinmad
kotlinprogrammers
kotlinsu
kotlintest
kotlintest-devs
kotlintlv
kotlinultimatechallenge
kotlinx-datetime
kotlinx-files
kotlinx-html
kotrix
kotson
kovenant
kprompt
kraph
krawler
kroto-plus
ksp
ktcc
ktfmt
ktlint
ktor
ktp
kubed
kug-leads
kug-torino
kvision
kweb
lambdaworld_cadiz
lanark
language-evolution
language-proposals
latvia
leakcanary
leedskotlinusergroup
lets-have-fun
libgdx
libkgd
library-development
linkeddata
lithuania
london
losangeles
lottie
love
lychee
macedonia
machinelearningbawas
madrid
malaysia
mathematics
meetkotlin
memes
meta
metro-detroit
mexico
miami
micronaut
minnesota
minutest
mirror
mockk
moko
moldova
monsterpuzzle
montreal
moonbean
morocco
motionlayout
mpapt
mu
multiplatform
mumbai
munich
mvikotlin
mvrx
myndocs-oauth2-server
naming
navigation-architecture-component
nepal
new-mexico
new-zealand
newname
nigeria
nodejs
norway
npm-publish
nyc
oceania
ohio-kotlin-users
oldenburg
oolong
opensource
orbit-mvi
osgi
otpisani
package-search
pakistan
panamá
pattern-matching
pbandk
pdx
peru
philippines
phoenix
pinoy
pocketgitclient
polish
popkorn
portugal
practical-functional-programming
proguard
prozis-android-backup
pyhsikal
python
python-contributors
quasar
random
re
react
reaktive
realm
realworldkotlin
reductor
reduks
redux
redux-kotlin
refactoring-to-kotlin
reflect
refreshversions
reports
result
rethink
revolver
rhein-main
rocksdb
romania
room
rpi-pico
rsocket
russian
russian_feed
russian-kotlinasfirst
rx
rxjava
san-diego
science
scotland
scrcast
scrimage
script
scripting
seattle
serialization
server
sg-user-group
singapore
skia-wasm-interop-temp
skrape-it
slovak
snake
sofl-user-group
southafrica
spacemacs
spain
spanish
speaking
spek
spin
splitties
spotify-mobius
spring
spring-security
squarelibraries
stackoverflow
stacks
stayhungrystayfoolish
stdlib
stlouis
strife-discord-lib
strikt
students
stuttgart
sudan
swagger-gradle-codegen
swarm
sweden
swing
swiss-user-group
switzerland
talking-kotlin
tallinn
tampa
teamcity
tegal
tempe
tensorflow
terminal
test
testing
testtestest
texas
tgbotapi
thailand
tornadofx
touchlab-tools
training
tricity-kotlin-user-group
trójmiasto
truth
tunisia
turkey
turkiye
twitter-feed
uae
udacityindia
uk
ukrainian
uniflow
unkonf
uruguay
utah
uuid
vancouver
vankotlin
vertx
videos
vienna
vietnam
vim
vkug
vuejs
web-mpp
webassembly
webrtc
wimix_sentry
wwdc
zircon
Powered by Linen
compose-web
  • j

    John O'Reilly

    05/28/2021, 4:32 PM
    If I use
    0.0.0-web-dev-13
    then I get following
    This version (1.0.0-beta08) of the Compose Compiler requires Kotlin version 1.5.0 but you appear to be using Kotlin version 1.5.10 which is not known to be compatible.
    but if go from Kotlin 1.5.10 back to 1.5.0 then I get following when I build Compose for Desktop module (which is using v
    0.4.0-rc1
    )
    This version (1.0.0-beta08) of the Compose Compiler requires Kotlin version 1.5.10 but you appear to be using Kotlin version 1.5.0 which is not known to be compatible.
    👀 5
    o
    • 2
    • 8
  • a

    Aditya Wasan

    05/31/2021, 3:12 PM
    Hey everyone, I was trying out compose-web and it seems like the behaviour is a bit different as compared to the jvm. E.g, this code did not align the two
    Text
    composables in a column. Just wanted to know if it's a bug or intended behavior.
    Column {
      Text("Hello")
      Text("Compose")
    }
    ➕ 2
    o
    u
    +2
    • 5
    • 10
  • t

    Tomáš Hubálek

    06/01/2021, 7:07 AM
    Hi, I started using JetPack Compose for Web and I have very good feelings from it. My question is: does it somehow support hot reload (when app executed via
    ./gradlew jsBrowserRun
    ) ? I see in web console
    client?0774:52 [WDS] Live Reloading enabled.
    but I don't think JetPack is supporting it at the moment.
    o
    s
    • 3
    • 3
  • s

    Sam

    06/01/2021, 7:28 AM
    What are the plans for the final API for styling
    Text
    component? Will it be consistent with https://developer.android.com/jetpack/compose/text or will it require wrapping it with
    Span
    as is at the moment?
    o
    a
    • 3
    • 4
  • t

    Tomáš Hubálek

    06/01/2021, 8:11 AM
    I have a question regarding selector. Is it possible in current version to define styles for HTML elements (eg. for
    body
    ). I found this snippet for classes
    object AppStyleSheet : StyleSheet() {
        val myStyle by style {
           ...
        }
    }
    but I didn't find the way how to define styles for HTML elements globally. Thanks
    o
    • 2
    • 2
  • c

    Carter

    06/01/2021, 2:08 PM
    Any ideas on workarounds or ways to isolate this down further?
    o
    h
    • 3
    • 5
  • c

    Carter

    06/01/2021, 5:00 PM
    Is the flag for
    suppressKotlinVersionCompatibilityCheck
    supposed to be the same with compose for web? I tried
    -P plugin:androidx.compose.compiler.plugins.kotlin:suppressKotlinVersionCompatibilityCheck=true
    although it seems to have no effect (I still get the error about the version incompatibility).
    👀 1
    o
    n
    • 3
    • 5
  • o

    Oleksandr Karpovich [JB]

    06/01/2021, 7:30 PM
    Hey everyone! We've published a new version 0.0.0-web-dev-14 - https://github.com/JetBrains/compose-jb/releases/tag/0.0.0-web-dev-14 It's using kotlin 1.5.10 and also adds some API changes (even breaking ones). We are sorry for inconvenience. Let us know how your migration goes if you give it a chance :) Thanks a lot!
    :kotlin-intensifies: 4
    🎉 23
    💪 1
    j
    h
    +3
    • 6
    • 16
  • h

    hfhbd

    06/02/2021, 7:51 PM
    Is it possible to store a @Composable function as an attribute and execute it later? I want to implement a table, which holds the composable rows and display/execute the composable row function lazily when needed
    data class Cell(val color: Color?, val content: @Composable () -> Unit)
    SPOILER: I get this error message:
    this._$cell_0._content is not a function. (In 'this._$cell_0._content($composer_0, 0)', 'this._$cell_0._content' is undefined)
    o
    g
    • 3
    • 9
  • h

    hfhbd

    06/03/2021, 8:26 AM
    Why is
    Option { }
    only usable from a
    UList
    , and not from
    Select
    ?
    a
    o
    • 3
    • 3
  • m

    Minecraaftt

    06/04/2021, 12:01 AM
    Does 0.0.0-web-dev-14.1 include android binaries, or are they still not included?
    o
    • 2
    • 1
  • s

    smallshen

    06/04/2021, 5:35 AM
    Are there existing wrapper for jetbrains ring ui? If not are there are any plans
    a
    f
    • 3
    • 6
  • s

    solidogen

    06/04/2021, 11:17 AM
    I'm rewriting my static sites in compose, any possibility to hack out a <strong> tag? Also might be worth mentioning about
    --continuous
    argument for jsBrowserRun task in Getting Started tutorial, developing with live reload is far more productive
    h
    • 2
    • 4
  • d

    darkmoon_uk

    06/05/2021, 3:30 AM
    I know it's early, early days for Web, but I'm trying to seed a project that compiles to Android, Desktop and Web targets. It's working out, albeit uncomfortable. Specifically: trying to find the versions of Compose dependencies that all work with the same Kotlin version took some time. The common denominator remains at 1.4.32. (EDIT: Wrong! ⚡ See in-thread for 1.5.x combo ⚡ 🙂 ) Also, code sharing opportunities remain limited due to their separation. What's the ball-park for an all-in-one artifact? Weeks, months, years... or not on any current roadmap?
    👀 2
    j
    j
    o
    • 4
    • 8
  • m

    Marko Novakovic

    06/07/2021, 5:14 AM
    two questions: 1. how do I set background color of entire page? 2. how do I set font for the app/website?
    o
    a
    • 3
    • 6
  • d

    darkmoon_uk

    06/09/2021, 7:16 AM
    @Oleksandr Karpovich [JB]
    o
    • 2
    • 1
  • t

    Tomáš Hubálek

    06/09/2021, 9:21 AM
    Hi, I have following code snippet:
    import org.jetbrains.compose.web.dom.Input
    
    ...
    
    Input(attrs = {
            onInput {
             console.log("New value is", it.nativeEvent.target.asDynamic().value as String))
            }
            attr("type", "email")
            attr("autocomplete", "email")
        }, value = value)
    It works fine when I'm typing. But when I use autocomplete, then app crashes with ClassCastException at this line:
    a
    o
    • 3
    • 8
  • u

    [JB] Shagen

    06/09/2021, 6:04 PM
    Hey! we've released new dev build https://github.com/JetBrains/compose-jb/releases/tag/0.5.0-build220-web Also - please let us know if it's too annoying to announce our weekly releases. It's just that some things are changing every week and till stabilization we'll break back compatibility quite often - though we put lot of effort not to do it when it's not absolutely needed.
    :thank-you: 1
    💪 1
    :jetpack-compose: 3
    🎉 30
    j
    a
    +2
    • 5
    • 4
  • b

    Brian G

    06/09/2021, 7:50 PM
    Trying to use compose for web, simply adding the dependency and I get lots of errors building along the lines of
    e: java.lang.IllegalStateException: Duplicate live literal key found
    . Is there a way to turn "live literals" off project wide instead of putting
    @NoLiveLiterals
    everwhere?
    j
    l
    +2
    • 5
    • 11
  • h

    hfhbd

    06/10/2021, 8:21 AM
    What is "wrong" with the 223 build? Edit: Nothing In a project containing android, desktop and web, this version works for all targets, see https://github.com/hfhbd/ComposeTodo/blob/main/build.gradle.kts But using this build in a single Compose Web target only, Gradle cannot fetch the POM file, https://maven.pkg.jetbrains.space/public/p/compose/dev/org/jetbrains/compose/web/web-core/0.5.0-build223/web-core-0.5.0-build223.pom See https://github.com/hfhbd/routing-compose/pull/11
    ✅ 1
    • 1
    • 1
  • s

    spierce7

    06/10/2021, 2:06 PM
    I’m curious if anyone has attempted to hook up compose-web to canvas kit, and leverage the existing widgets.
    b
    j
    b
    • 4
    • 4
  • b

    Brian G

    06/10/2021, 5:47 PM
    Is there a way to control which targets compose compiler runs for without splitting up my code into more modules?
    o
    • 2
    • 5
  • d

    darkmoon_uk

    06/11/2021, 6:41 AM
    To fully use 'multiplatform widgets' we currently need to use the word web:
    implementation(compose.web.widgets)
    ...in common code. The underlying string is also web-specific, being:
    org.jetbrains.compose.web:web-widgets:0.5.0-build224
    I hope it's only like this during development phase as it's counter-intuitive. Is there a plan to bring these into a truly common namespace/artifact?
    🙏 1
    o
    o
    • 3
    • 2
  • h

    hfhbd

    06/11/2021, 5:44 PM
    I did not find a typed routing library, so I implemented one by myself. Any feedback is welcome! https://github.com/hfhbd/routing-compose
    ❤️ 1
    :kotlin-intensifies: 13
    r
    u
    • 3
    • 2
  • s

    Sam

    06/11/2021, 9:10 PM
    I’m trying to read Input’s value on input change like this:
    Input(type = InputType.Text, attrs = {
        onInput {
            console.log(it.nativeEvent.target.asDynamic().value)
        }
    })
    Is there a more elegant/safe way of doing it (alternative to
    WrappedInputEvent.nativeEvent.target.asDynamic().value
    )?
    u
    h
    • 3
    • 2
  • t

    theapache64

    06/13/2021, 8:40 AM
    Just another compose thing 😉 🚀 https://twitter.com/theapache64/status/1403995465113169923
    :kotlin-intensifies: 21
    b
    e
    • 3
    • 9
  • s

    spierce7

    06/14/2021, 3:54 PM
    A good amount of the work has already been done to optimize compose at the common / compiler level already. I realize performance hasn’t been considered yet from the web / js perspective, but I wonder how good the performance of compose web would be when compared against react when using plain HTML dom components.
    ➕ 1
    t
    o
    • 3
    • 2
  • j

    jw

    06/14/2021, 4:03 PM
    not doing a virtual dom should already place it far ahead. a more interesting comparison would be svelte
    s
    • 2
    • 1
  • c

    Colton Idle

    06/14/2021, 4:29 PM
    React noob and compose noob here so sorry if this comes off as stupid, but am I understand what jake said correctly? Compose for web should be "better" perf wise than react because it doesn't use a virtual dom? Isn't the concept of the virtual dom close to composes tree where it "diffs" things?
    s
    j
    +2
    • 5
    • 5
  • c

    Colton Idle

    06/15/2021, 1:34 AM
    I have no reason/excuse to use compose for web yet... but this week I'm getting started on a chrome extension... and so I get to use compose for web! Thanks @theapache64
    🎉 3
    😇 2
    t
    • 2
    • 1
Powered by Linen
Title
c

Colton Idle

06/15/2021, 1:34 AM
I have no reason/excuse to use compose for web yet... but this week I'm getting started on a chrome extension... and so I get to use compose for web! Thanks @theapache64
🎉 3
😇 2
t

theapache64

06/15/2021, 8:44 AM
Can't wait to see what you're going to build. so excited. all the best 👍
View count: 7