Comments (11)
I also encountered this, for now I add Serializable into the mix to workaround this issue
@parcelize
data class NavParam(
var firstName: String = "",
): Parcelable, Serializable
from voyager.
Can confirm that this issue is still present in the latest version (1.0.0-rc03
).
Take the example from documentation: https://voyager.adriel.cafe/state-restoration
// βοΈ DO
@Parcelize
data class Post(/*...*/) : Parcelable
data class ValidScreen(
val userId: UUID, // Built-in serializable types
val post: Post // Your own parcelable and serializable types
) : Screen {
// ...
}
This "DO" example will actually lead to a crash whenever ValidScreen
has to be parcelized, such as when activity goes into background. The solution by @DjakaTechnology does indeed mitigate the issue.
from voyager.
if some one using it in a kmm app. you can do expect actual to get java.io.Serilizable
actual typealias CommonSerializable = java.io.Serializable
expect CommonSerializable
and then
data class SomeClass(val foo: String) : CommonSerializable
from voyager.
@adrielcafe @DevSrSouza @Syer10
I tagged you guys, because you are the main maintainers of the code.
Please see this issueπππ
from voyager.
Facing this on 1.0.0-rc02
from voyager.
1.0.0-rc04 and it is still present. @adrielcafe is there any new on this theme?
from voyager.
The documentation was misleading, we have updated it with more samples and Multiplatform notice.
https://voyager.adriel.cafe/state-restoration
from voyager.
Any update on this guys ????
from voyager.
@KapilYadav-dev i have updated my comment that solves this issue
from voyager.
@Kashif-E what about desktop and ios for their platform?
from voyager.
@KapilYadav-dev is just a plain interface in this case
actual interface CommonSerializable
from voyager.
Related Issues (20)
- Voyager Screen with a `ViewModel` does not have its `SavedStateHandle` saved on process death HOT 1
- Custom back handling depending on the currentScreen HOT 2
- Integration with KMMViewModel
- Nesting Navigators prevents WindowInsets from being updated upon device rotation on iOS
- Parcelable encountered IOException writing serializable object HOT 6
- Configuration changes not handled - Tab Options
- Recommended way to implement application that requires login? HOT 4
- Screen State not getting retained HOT 2
- Update compose version to 1.6.1 HOT 2
- Cant pass a lambda to a Screen HOT 2
- Saveable state exception on transition HOT 1
- ViewModel not found in hilt graph. Please, check if you have a Multibinding HOT 1
- Deeplink in IOS HOT 1
- State Preservation Issue with Nested Navigators in Voyager HOT 5
- how can I change BottomSheetNavigator background in Screen? HOT 1
- Navigation from ScreeModel HOT 2
- [Bug][Deeplink] Navigator stack doesn't change after screens list changes
- How to set the actionbar functionalities using the TabNavigation?
- TabDisposable with nested/parent navigation loses Screen state
- Recomposition issue when using nested Navigators and MaterialKolor HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from voyager.