Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8463921
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T14:35:04+00:00 2026-06-10T14:35:04+00:00

I am using findOne just to fetch one certain element for my collection. However,

  • 0

I am using findOne just to fetch one certain element for my collection.

However, when I do that, all my template functions containing those collections are re-run and the content refreshed. The content is similar, the problem is I am applying styles to some of those elements, and these updates just reset everything as well. More importantly: those refreshes are completely useless.

For example, I have this template:

Template.content.cars = function () {
    alert("I AM RERUN!");
    return Cars.find();
};

And in another function, I am doing this:

Cars.findOne({ _id: Session.get('current_car') }, {});

Why would be the first template re-run? Am I doing something wrong?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T14:35:06+00:00Added an answer on June 10, 2026 at 2:35 pm

    I’m not sure why your first template would be re-run: are you sure something else isn’t going on?

    But as a general non-answer to your question: you should expect that a template which depends on the entirety of a collection will be re-run many times (for instance as the data loads incrementally when the page first renders). With meteor you need to write your HTML/CSS in such a way that this re-rendering won’t cause problems.

    Without knowing more about your problem I can’t really say more than that.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Im using the npm mongodb driver with node. I have collection.findOne({query}, function(err, result) {
I cant find one way to get this value (comment) into json using javascript.
Using a CSS image sprite, I'm creating an 'interactive' image where hovering over certain
Using the Redis info command, I am able to get all the stats of
Using ASIHTTPRequest, I downloaded a zip file containing a folder with several audio files.
I was just downloading a new distro of linux using uTorrent, and started to
I am considering developing an application using Ruby on Rails that is a planner
I'm noticing that MongoDB is collapsing multiple spaces together (into one space) when saving
I recently started using C# and WPF for one of my projects. Is there
I'm experimenting with MongoDB using the PHP PECL extension, however I'm having difficulty getting

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.