Skip to content

What's the replacement for mapTemplate #180

Answered by ai
j asked this question in Q&A
Apr 16, 2023 · 1 comments · 3 replies
Discussion options

You must be logged in to vote

Use something like this:

export function getPost (id) {
  if (!Template.cache[id]) {
      let store = atom()
      // add all callbacks
      Template.cache[id] = store
    }
    return Template.cache[id]
}

getPost.cache = {}

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@j
Comment options

@ai
Comment options

@j
Comment options

Answer selected by ai
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
Converted from issue

This discussion was converted from issue #179 on April 16, 2023 21:44.