Giter Site home page Giter Site logo

Comments (4)

hrach avatar hrach commented on May 22, 2024 1

My use case is the main screen (also a destination) has many navigables to other screens and so I have them created separately as a list and passing them around - then I need to type them.

I kind of like that a Destination annotation generates a Destination

I'd say it can also bring some confusion. We are marking a composable as a destination, but the generated resulting object is much more than a "destination", it is a routing specs, argument processor, navigation factory... Since this interface is used much less than the annotation I'd change its name. Surprisingly, I've just realized the interface is already named correctly - DestinationSpec. It seems quite right to me.

Knowing this it seems to be solved for me as I don't utilize the sealed interface.

from compose-destinations.

raamcosta avatar raamcosta commented on May 22, 2024

Hi @hrach 👋
Thanks for the feedback!

I understand, but at the same time I kind of like that a Destination annotation generates a Destination.
What I found is that it should be rare that you want to import both of them in the same file.
What is your use case for wanting to import both in the same file?

I'm definitely not excluding the possibility of renaming the interface. It's just that I'd like to know exactly the cases where we'd want to import both of them before I make a decision.

from compose-destinations.

raamcosta avatar raamcosta commented on May 22, 2024

Btw, this might be a good solution in the meantime:

typealias AppDestination = com.ramcosta.composedestinations.Destination

Put this anywhere and then you can refer to the Destination interface as AppDestination.

from compose-destinations.

raamcosta avatar raamcosta commented on May 22, 2024

Yap, in the core, the interface is DestinationSpec. The only reason we have Destination generated is so that it can be sealed. I think it allows for some neat extension functions/properties.

I think with both solutions described here typealias and just using DestinationSpec, we can close this issue for now, if you agree. Later if this comes up again, I'll rethink the name of the generated one.

Please close it if you agree 🙂

from compose-destinations.

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.