Code Monkey home page Code Monkey logo

Comments (5)

terrakok avatar terrakok commented on July 23, 2024 1

I'm pretty sure it is a duplicate of this
#4476

from compose-multiplatform.

terrakok avatar terrakok commented on July 23, 2024 1

#4965

from compose-multiplatform.

malbanese avatar malbanese commented on July 23, 2024

@terrakok Looks similar.

Would it be viable to change the ResourceReader interface and local composition to not be internal?

internal val LocalResourceReader = staticCompositionLocalOf { DefaultResourceReader }

It's not a perfect solution, but would at least allow for customization when needed.

from compose-multiplatform.

terrakok avatar terrakok commented on July 23, 2024

How will it help you?

from compose-multiplatform.

malbanese avatar malbanese commented on July 23, 2024

In this case, it would help me get preview code working by allowing me to override it.

My current solution is to expose my own composition local with my own version of the resource fetching methods, which ultimately call into the JB versions (or not).

Beyond that, I think allowing for overrides of it does present some interesting opportunities, but they would all be niche use cases. I also admit, it would mean exposing the internals of resource storage, which may not be something the team wants to do.

For example:

  1. In past apps we've exposed an option which allows the debug apps to swap string values with the backing keys, for visual debugging purposes.

  2. It also opens up interesting opportunities to allow for remotely updatable strings, possibly without creating an explicit wrapper API.

Both points can be done by just wrapping the API, but they are interesting use-cases, at least.

from compose-multiplatform.

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.