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
  • n

    Nat Strangerweather

    04/04/2021, 9:39 AM
    To move a shape around, I can use Modifier.pointerInput etc. Now how about a rectangle on canvas? As there is no Modifier. Is there a way with Compose or should I use the native way?
    k
    z
    +2
    • 5
    • 14
  • n

    Nthily

    04/04/2021, 12:32 PM
    Can anyone tell me how to use FocusState with the latest version of focus? I want to determine if my TextField is in the focus state
    k
    m
    • 3
    • 2
  • m

    Muhammad Zaryab Rafique

    04/04/2021, 5:07 PM
    Hey Everyone, I successfully toggle between dark theme to light and light to dark, but I facing issue storing to shared preference. Anyone have idea of this
    z
    c
    • 3
    • 12
  • e

    enighma

    04/04/2021, 7:39 PM
    I've started playing with
    NavHost
    I love the way I can setup navigation with it. What I'm trying to understand is how I can get it to animate. I see that when I call
    navigate()
    I have a lambda where I can provide options such as Anim. I have something like this:
    navController.navigate(Destination.newGame) {
      anim { enter }
    }
    I'm guessing that I haven't defined the enter animation, since no animation is defined. Where do I define that? In the MaterialTheme somehow?
    i
    • 2
    • 4
  • s

    Slackbot

    04/04/2021, 9:16 PM
    This message was deleted.
    k
    m
    • 3
    • 2
  • z

    zsperske

    04/04/2021, 10:28 PM
    Has anyone written a composable that can display an image from firebase storage? I had something working on an older alpha but I’m curious if there’s a new option.
    m
    • 2
    • 4
  • c

    Colton Idle

    04/04/2021, 11:42 PM
    What's the keyboard shortcut to wrap a composable in a Col or Row quickly? I highlighted a Text("adsf") and wanted to "surround with" with a Column. I thought there was a way to do this out of the box? I searched slack but only result was regarding a plugin, but I thought this came out of the box?
    k
    • 2
    • 5
  • c

    Colton Idle

    04/05/2021, 12:40 AM
    It looks like
    ExposedDropdownMenu
    from material android isn't available out of the box. Does anyone have a good gist to use as a replacement? I'm trying to create this from the docs.
    n
    • 2
    • 4
  • r

    Ravi

    04/05/2021, 2:38 AM
    hi, im using lazyrow to display horizontal instagram suggestions kind of list . And this is part of lazycolumn list item. When i use
    IntrinsicSize.Min
    its giving me
    Intrinsic measurements are not currently supported by SubcomposeLayout
    . description text vary from 1-2 lines how to maintain common height for all the row elements
    LazyRow(
            state = listState,
            modifier = modifier.height(IntrinsicSize.Min),
            horizontalArrangement = Arrangement.spacedBy(8.dp),
        )
    b
    a
    • 3
    • 2
  • z

    Zhelyazko Atanasov

    04/05/2021, 6:09 AM
    I'm trying to build a simple screen, but I'd want to restrict the
    width
    of a
    Column
    to a percentage of the screen width. So I'm using
    Modifier.fillMaxWidth(0.8f)
    but the
    Column
    is still occupying the max screen width. Is this an expected behaviour and I haven't fully understood the
    fraction
    argument or it's some kind of a bug? I'm using
    beta03
    If that matters, the
    Column
    is put inside a
    Surface
    with
    fillMaxSize()
    set.
    Column(
            modifier = Modifier
                .fillMaxWidth(0.8f)
                .fillMaxHeight()
                .background(Color.Green)
        ) {
            val (email, setEmail) = remember { mutableStateOf(TextFieldValue()) }
            TextField(
                value = email,
                onValueChange = { setEmail(it) },
                modifier = Modifier
                    .align(CenterHorizontally)
            )
        }
    a
    • 2
    • 3
  • m

    Marko Novakovic

    04/05/2021, 6:57 AM
    when using
    var state by remember { mutableStateOf(…) }
    I get error saying there are no
    get
    and
    set
    methods BUT I have
    import androidx.compose.runtime.getValue
    import androidx.compose.runtime.setValue
    and they are grey, not used. same
    get
    and
    set
    methods error when using
    import androidx.compose.runtime.*
    Any fix?
    c
    f
    • 3
    • 4
  • m

    Marko Novakovic

    04/05/2021, 7:20 AM
    remember {}
    saves X for recomposition but when composable leaves the screen X is forgotten. if I want to save X even when composable leaves the screen I should use
    rememberSaveable {}
    right? it seems weird because concept of
    rememberSaveable {}
    is for surviving
    recreating
    but composable leaving the screen is not
    recreation
    . conceptually not the same. should I use
    rememberSaveable {}
    or there is some other way to handle this use case?
    k
    a
    +3
    • 6
    • 12
  • u

    Utkarsh Tiwari

    04/05/2021, 4:12 PM
    Is there any way to disable scroll and clicks on children in a LazyColumn?
    a
    g
    • 3
    • 5
  • c

    Colton Idle

    04/05/2021, 11:12 PM
    I have this design that I recreated from figma/sketch from my designer. These two text fields don't have any spacers between them in sketch. It looks like it's just line height that's being taken into account... but my composable ends up looks squished. Like it's right on top of each other with no space. The only idea I have in mind is that compose/android doesn't "show" the space below a line if it's a single line? Because this type style does indeed have line spacing added in the Type delcaration, but it just doesn't seem to have it at runtime. It's part of our design system and so I can't quite rip it out in order to create a minimal reproducible sample, but I was curious if anyone had any ideas. I know compose doesn't have an option to disable fontPadding, but in this case... it's almost like I expected even more font padding. @Siyamed any thoughts? I know I talked about this to you on twitter I think like monttttths ago as one of my worst things in the current view based system is matching my designers with text. There's always some slight spacing issue. iOS seems to look just fine and so now I have to manually put in paddingBottom on the top Text. thanx
    s
    s
    +4
    • 7
    • 125
  • c

    Chris Fillmore

    04/06/2021, 1:12 AM
    Hi everyone. Am I allowed to declare a
    @Composable
    method on an interface? something like:
    interface ImageLoader {
      @Composable
      fun Image(url: String)
    }
    I have similar code implemented right now, which compiles but throws NoSuchMethodError at runtime
    :yes: 1
    z
    a
    • 3
    • 6
  • c

    Chris Fillmore

    04/06/2021, 1:14 AM
    to clarify, of course I have an implementation elsewhere, like:
    class CustomImageLoader : ImageLoader {
      @Composable
      override fun Image(url: String) {
        // Load and draw the image
      }
    }
    s
    • 2
    • 6
  • s

    Socheat KHAUV

    04/06/2021, 2:51 AM
    CompositionLocalProvider(LocalContentAlpha provides ContentAlpha.medium) {
        AndroidView(
            factory = { context ->
                PreviewView(context).apply {
                    this.layoutParams = ViewGroup.LayoutParams(
                        ViewGroup.LayoutParams.MATCH_PARENT,
                        ViewGroup.LayoutParams.MATCH_PARENT
                    )
                    preview.setSurfaceProvider(this.surfaceProvider)
                }
            },
            modifier = Modifier.fillMaxSize()
        )
    }
    I wrapped a camera preview within CompositionLocalProvider and gave an alpha value to medium, it does not work. anyone have some idea ?
    a
    • 2
    • 7
  • d

    darkmoon_uk

    04/06/2021, 4:20 AM
    Any news on when a Kotlin 1.5 compatible Compose Beta is likely to hit the shelves? Some time after the 1.5 production release?
    a
    • 2
    • 1
  • a

    Ahmet Delibaş

    04/06/2021, 7:09 AM
    Hi folks. I wanted to observe a livedata value. I started the process in a composable and then I switched the screen. If I don't switch the screen, I can observe the changing livedata in the same composable. But when I switched it, I cannot observe anymore. Do you guys have any idea?
    m
    a
    +2
    • 5
    • 19
  • m

    Marko Novakovic

    04/06/2021, 8:12 AM
    class TestData(val test: String)
    
    @Composable
    fun StableTest() {
        var state by remember { mutableStateOf(TestData("Marko")) }
    
        SideEffect {
            println(state.test)
        }
    
        Text(
            modifier = Modifier
                .clickable { state = TestData("Marko") }
                .padding(32.dp),
            text = state.test,
        )
    }
    this triggers recomposition,
    TestData
    is not stable, but
    data class TestData(val test: String)
    doesn’t. Is there a reason to additionally mark
    data class
    with
    @Stable
    ? or is
    @Stable
    kind of forcing stability? but adding
    @Stable
    to non
    data class
    version still triggers recomposition
    a
    • 2
    • 5
  • j

    Jason Ankers

    04/06/2021, 8:28 AM
    Any reason why
    AnimatedVisibility
    doesn’t have a callback when the animation finishes?
    d
    • 2
    • 4
  • c

    Colton Idle

    04/06/2021, 12:11 PM
    If I have a pure compose app that is a single activity and I'm already using Chris Banes' Accompanist for insets, and I want to be laid out edge to edge, what kind of theme comes out of the box that allows me to set a transparent navigation and status bar? The closest I could find is
    android:theme="@android:style/Theme.Material.Light.NoActionBar.TranslucentDecor"
    but I was hoping to find something like
    Theme.Material.Light.NoActionBar.EdgeToEdge
    .
    j
    a
    • 3
    • 7
  • n

    Nat Strangerweather

    04/06/2021, 2:56 PM
    I am using an AndroidView composable to show a non-Compose canvas in my Compose UI. In my non-Compose onDraw (), I can save my canvas as a bitmap successfully. The problem is that I want to save the bitmap from the onclick of a Button composable in my UI. Saving works but the bitmap is black. What could I be missing?
    z
    r
    • 3
    • 34
  • d

    Daniel Candeias

    04/06/2021, 3:57 PM
    Currently struggling with simple animations. If someone can take a look at SO question: https://stackoverflow.com/questions/66971191/android-compose-animation-like-horizontal-progress-indicator Any help appreciated 🙏
    z
    g
    • 3
    • 3
  • z

    Zach Klippenstein (he/him) [MOD]

    04/06/2021, 4:05 PM
    Something that trips up a lot of people when they’re first learning Compose is remembering all the different bits of magic that go into making lines like this:
    var text by remember { mutableStateOf("") }
    I made a little cheat sheet to help break it down, and hopefully serve as a quick reference if you forget.
    😽 1
    ❤️ 29
    👌🏼 3
    👌 17
    l
    l
    t
    • 4
    • 6
  • y

    Yuri Drigin

    04/06/2021, 4:57 PM
    Hi folks! How can scroll to the focused textfield when soft keyboard appear. Use Simple Column with vertical scroll
    r
    • 2
    • 1
  • g

    Gabriel Melo

    04/06/2021, 8:24 PM
    I have a screen with a Scaffold, a FAB in its slot and a LazyColumn as content. I'd like to show a Card at the bottom of the screen without it overlapping my FAB. Is there any slot in a Scaffold where I could put this Card? If not, how can I have it not overlap the FAB if they're not children of the same view? Is this even doable with Scaffold?
    • 1
    • 1
  • s

    Shivam Sethi

    04/07/2021, 12:24 AM
    How can I pass a
    String argument
    having spaces or newline escape sequence from 1
    destination
    to another ? I am using
    navigation compose
    currently it breaks if I try to do it according to documentation ? here the destination
    NEXT/${argument}
    breaks if argument string has space in it ?
    i
    • 2
    • 4
  • c

    Colton Idle

    04/07/2021, 12:26 AM
    Found a reproducible(?) case of preview not working. Basically just using a color from a custom theme as a background causes preview to fail. Code in thread. Stacktrace snippet:
    Render Problem
    java.lang.IllegalStateException: No RollerToasterColorPalette provided   at com.rollertoaster.app.theme.ThemeKt$AmbientRollerToasterColors$1.invok
    a
    j
    c
    • 4
    • 9
  • f

    Filip Wiesner

    04/07/2021, 8:14 AM
    I have a stupid question. If we remember some value and save it to a variable like this
    var foo = remember { "hello" }
    , when we mutate the variable (
    foo = "world"
    ) it won't save it to next recomposition, right? We just mutate the variable in the current function scope.
    w
    j
    +2
    • 5
    • 23
Powered by Linen
Title
f

Filip Wiesner

04/07/2021, 8:14 AM
I have a stupid question. If we remember some value and save it to a variable like this
var foo = remember { "hello" }
, when we mutate the variable (
foo = "world"
) it won't save it to next recomposition, right? We just mutate the variable in the current function scope.
I am unsure because I know I've done something like this in my early compose experiments and it worked but I know it shouldn't 😅
And I am writing article about compose basics and I want to be sure I don't write something stupid.
w

wbertan

04/07/2021, 8:23 AM
I believe so, in your case you have to do
foo.value = newValue
and to access the value with
foo.value
. To use the Delegate you have to use the `by`:
var foo by remember { mutableStateOf("hello") }
        foo = "newValue"
f

Filip Wiesner

04/07/2021, 8:25 AM
I am not using
State
tho so there is no
foo.value
and no delegate.
🤔 1
j

julioromano

04/07/2021, 8:26 AM
In “theory” yes. But IMHO it’s not good practice because composable function calls can be run in any order by the compose runtime. If you rely on changing
foo
the way you mentioned, it will be difficult to ensure all composable functions that have
foo
visible in their scope see the same mutated value of
foo
. If you need mutable state you should remember a
mutableStateOf("hello")
.
f

Filip Wiesner

04/07/2021, 8:31 AM
Maybe I didn't explain myself properly. I know I shouldn't do this and I would never do. In my article I am trying to explain the meaning of
remember
and
State
separately because I don't want the reader to understand
remember { mutableStateOf() }
as one thing. While explaining this I realized that I am not 100% sure that I know how it will behave so I just wanted to make sure 😄
it will be difficult to ensure all composable functions that have 
foo
 visible in their scope
So if some inner composable function recomposes, will it get the new value of
foo
variable?
j

julioromano

04/07/2021, 8:40 AM
So if some inner composable function recomposes, will it get the new value of 
foo
 variable?
I think the safe answer here is “it’s not possible to know it reliably”, but I feel like I’m reaching the edge of my knowledge here, I’m sure somebody else might give a better answer. Updated answer: Yes, but only if it recomposes after
foo
has been mutated.
:thank-you: 1
a

Albert Chang

04/07/2021, 8:56 AM
remember
always returns the same instance produced by executing the block in the first composition.
foo
is just a pointer so changing the value
foo
points to doesn't affect what
remember
returns.
So if some inner composable function recomposes, will it get the new value of 
foo
 variable?
The inner function captures the pointer so I think the answer is yes.
f

Filip Wiesner

04/07/2021, 8:59 AM
I think that's all I need. Thank you both @julioromano @Albert Chang 👌
(I almost wrote "closing this issue" 🤦‍♂️ )
j

julioromano

04/07/2021, 9:20 AM
@Albert Chang Isn’t it possible that the inner function gets re-run directly by compose (i.e. only the inner function is re-run, the outer function is not)? Perhaps because the inner function was reading some other snapshot state object which has changed. (Sorry if the question sounds weird, I’m deliberately trying to test my mental model of the subject.)
a

Albert Chang

04/07/2021, 9:22 AM
@julioromano As I said what the inner function captures is the pointer which always points to the latest value.
j

julioromano

04/07/2021, 9:32 AM
Got it, so if the code was actually:
var foo = remember { "hello" }
  foo = "newValue"
It means that any other code will see “newValue”, so in this case the
remember
call is useless, it’s just polluting the composition by adding a “hello” string to it that will never be read. I get that @Filip Wiesner is asking this for teaching purposes, I just wanted to be sure such a “pattern” would never be actually useful in real life.
f

Filip Wiesner

04/07/2021, 9:35 AM
in this case the 
remember
 call is useless, it’s just polluting the composition by adding a “hello” string to it that will never be read
(nitpicking a little bit) It will be read exactly once and assigned to the variable but other than that, that's exactly how I understand it.
j

julioromano

04/07/2021, 9:39 AM
Ah yes, during recompositions the memoized “hello” will be read from the composition and assigned to
foo
briefly, just to be overwritten by “newValue” right after.
:yes: 1
f

Filip Wiesner

04/07/2021, 9:40 AM
For sake of completeness, here is the section of the article I was writing:
👍 1
j

julioromano

04/07/2021, 10:36 AM
The case I was thinking about earlier is similar to @Filip Wiesner ’s last example but adds another composable (a
Button
) that recomposes on each click (recomposition is triggered thanks to
someState
snapshot state object):
@Composable
private fun MyOuterComposable() {
    Column {
        var searchValue = remember { "" }
        var someState by remember { mutableStateOf(".") }
        OutlinedTextField(
            value = searchValue,
            onValueChange = { searchValue = it },
        )
        Button({ someState = someState.plus(".") }) {
            Text("someState: $someState - searchValue: $searchValue")
        }
    }
}
The value of
searchValue
that
Button
displays depends on when
Button
has been recomposed. If it recomposes after
searchValue
has been mutated then it will show the mutated value, otherwise not. Since the order in which composables (i.e.
Button
in this case) recompose may not always be reliably predicted, we can’t be sure which value of
searchValue
will be read by
Button
. Disclaimer: this kind of code is just for learning purposes, it should never be used in production.
f

Filip Wiesner

04/07/2021, 10:50 AM
Learning about Compose is so exciting! 😄 I can't wait for when I'll use it on a real project.
s

Sean McQuillan [G]

04/07/2021, 4:33 PM
Yes this works as expected (which is not to work due to string immutability), though it's not a recommended practice for the reasons outlined above. If you put a mutable value in there, you can use it to update stored values without triggering recomposition, which we do using https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:compose/[…]kotlin/androidx/compose/ui/node/Ref.kt?q=Ref%3CT%3E%20compose
Which I can't find a usage of in remember anywhere anymore
TL;DR don't do that unless you're really really sure you know what you're doing and you're building alternative effects like
Reducer(...)
or
Prev(...)
🙂
j

julioromano

04/07/2021, 4:40 PM
What are
Reducer(...)
 or 
Prev(...)
? Are they something in compose? Or you mean Reducer as in Redux ?
s

Sean McQuillan [G]

04/07/2021, 4:40 PM
You can make a composable function that does reducer behavior, which will require access to the previous value; none of this is part of Compose but it's possible to write and you'll need a Ref somewhere in there 🙂
😮 1
View count: 2