FirebaseExtended / make-it-so-android

Apache License 2.0
214 stars 58 forks source link

Adding state hoisting in order to have the compose preview available. #6

Closed jgavazzisp closed 1 year ago

jgavazzisp commented 2 years ago

Hi there, thanks for creating the project to nudge the community towards the recommended way to work with Firebase.

I just have one suggestion for now which is to do a state hoisting on the screen — I've submitted one example and can do the same for the other ones if you guys are happy with it —.

After doing the state hoisting we can add the preview tag to the screen and enable live edits — when using Android Studio Electric Eel — to have fast feedback on UI changes.

Please feel free to discard the PR if you feel it is not useful.

marinacoelho commented 2 years ago

Hi @jgavazzisp thank you so much for your contribution!

There are 4 articles that have been released based on this code (the links are updated in the README file), and they are based in this version of the code (that initializes the ViewModels in the composable functions). Because of that, I wanted to suggest that you edit this PR to merge the code in this other branch called adding-preview-tag.

After we merge the PR, I will edit the README to contain instructions for developers who are already using Electric Eel and would like to give the live edit a try, so they can checkout the new branch. Also, feel free to make the same changes for the other screens as you said!

marinacoelho commented 1 year ago

Closing this PR as it has been more than 3 months without an answer and the code version has upgraded to 2.0.0, containing a lot of changes that affect the changes made here.