Skip to content

Reactive useFluent() #908

Answered by niusia-ua
niusia-ua asked this question in Q&A
Jan 23, 2025 · 1 comments · 2 replies
Discussion options

You must be logged in to vote

I investigated that the UI framework I use supports getter functions in the label definition that makes them reactive.

  const menuOptions = ref<MenuItem[]>([
    {
      label: () => fluent.$t("file"),
      items: [
        { label: () => fluent.$t("open") },
        { label: () => fluent.$t("create") },
        { label: () => fluent.$t("save") },
        { label: () => fluent.$t("close") },
      ],
    },
  ]);

If this is the correct usege of useFluent(), then I will close the discussion.
Sorry for bothering you.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@Demivan
Comment options

@niusia-ua
Comment options

Answer selected by Demivan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy