I am currently trying to integrate compose in my existing app… nearly all screens are build with a recyclerview and round about 200 different viewholder types….
every screen can display all of this viewholder types.
so my problem is that i can´t migrate all types at once and i created a viewholder with a composeview where i can call the migrated stuff
1. Is it a good practice to do migration like this. i noticed that every call to MyCustomTheme creates new CompositionLocals that i create in it
2. will the view be recomposed every time the bind method is called?
z
Zach Klippenstein (he/him) [MOD]
07/28/2021, 4:05 PM
That seems like a very reasonable way to approach an incremental migration. It’s probably not an ideal design for a green-field app, but it sounds like this is a temporary state. Once you've finished the migration of individual view holders you can replace your recycler views with compose and lift those theme wrappers up.
Zach Klippenstein (he/him) [MOD]
07/28/2021, 4:06 PM
The only potential issue I see with this is if your legacy code also defines themes somewhere, then making sure you compose theme wrapper respects that
b
bodo
07/28/2021, 4:26 PM
Thx for your feedback. Any other recommandations or best practises?
Also maybe you or some other guys can give me some tips for my two issued?