Giter Site home page Giter Site logo

Comments (1)

dessalines avatar dessalines commented on July 20, 2024

Went with "Page" as a suffix instead of "Activity". Not a diehard on this change, but I'm unfamiliar with the convention of calling these "activities" instead of "pages", which threw me off at first.

page is fine. The main thing is to make sure Page / Activity / Routes / Screen (s) are easily distinguishable from inner components.

It arguably makes more sense to colocate these with the relevant components instead of throwing them in the common serverfns directory.

You never know where these might be used elsewhere tho, and its best to keep them separate from UI items. In android these are called viewmodels (a place to fetch and persist reactive data across screens), and the top-level pages can use one or more of them. For example an AccountServerFns or a CommunityServerFns will probably be used for multiple screens. So it does make sense to have them in their own folder separate from ui/components, even if most of the time its 1 route using 1 component.

As for top level screens tho, it does make sense to put those in a ui/components So I'd recommend:

  • src
    • ui
      • components
        • home
          • home_page.rs
          • home.rs (for extras specific to home)
        • common (shared UI components)
        • utils (UI-specific utils)
    • serverfns
      • home_fns.rs
    • utils

The other things look fine to me.

from lemmy-ui-leptos.

Related Issues (16)

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.