Git Product home page Git Product logo

Comments (11)

DjakaTechnology avatar DjakaTechnology commented on May 18, 2024 4

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.

arslan-charyyev-pc avatar arslan-charyyev-pc commented on May 18, 2024 2

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.

Kashif-E avatar Kashif-E commented on May 18, 2024 1

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.

zakrodionov avatar zakrodionov commented on May 18, 2024

@adrielcafe @DevSrSouza @Syer10
I tagged you guys, because you are the main maintainers of the code.
Please see this issueπŸ™πŸ™πŸ™

from voyager.

Kashif-E avatar Kashif-E commented on May 18, 2024

Facing this on 1.0.0-rc02

from voyager.

ghostmane0404 avatar ghostmane0404 commented on May 18, 2024

1.0.0-rc04 and it is still present. @adrielcafe is there any new on this theme?

from voyager.

DevSrSouza avatar DevSrSouza commented on May 18, 2024

The documentation was misleading, we have updated it with more samples and Multiplatform notice.
https://voyager.adriel.cafe/state-restoration

from voyager.

KapilYadav-dev avatar KapilYadav-dev commented on May 18, 2024

Any update on this guys ????

from voyager.

Kashif-E avatar Kashif-E commented on May 18, 2024

@KapilYadav-dev i have updated my comment that solves this issue

from voyager.

KapilYadav-dev avatar KapilYadav-dev commented on May 18, 2024

@Kashif-E what about desktop and ios for their platform?

from voyager.

DevSrSouza avatar DevSrSouza commented on May 18, 2024

@KapilYadav-dev is just a plain interface in this case

actual interface CommonSerializable

from voyager.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.