Comments (5)
If you're getting a change event, there's something else at play here because collection-hooks doesn't fire two operations -- in fact it's just wrapping the original insert and firing off these callbacks before and after. Are you doing an upsert
perhaps?
from meteor-collection-hooks.
It is a regular insert. I made a sample app to illustrate what I am talking about.
https://github.com/cbelsole/meteor-insert-hook-test
from meteor-collection-hooks.
That's latency compensation at work... You're only setting up the hook on the server, so the behavior makes sense. Try removing the server conditional around the hook.
from meteor-collection-hooks.
I see. When it tries to write to the client (added) and then syncs with the server. At the server it adds the information to the document and then syncs back with the client (changed). Thanks for helping me figure that out.
from meteor-collection-hooks.
You got it :)
from meteor-collection-hooks.
Related Issues (20)
- More explanation of 0.9.0 breaking changes please HOT 5
- How i can extend ALL collections? HOT 6
- After fetch hook? HOT 3
- An after.update hook's modifier doesn't get a before.update's updated modifier
- Add GitHub actions for CI HOT 2
- Using direct still causes fetchPrevious behaviour on update method
- hook "remove" does not remove hook or removes wrong hook HOT 1
- bulk update didnt trigger after update hooks HOT 3
- attach hooks to raw collections HOT 3
- Meteor 2.6: after.insert callback does not contain correct document _id HOT 2
- problem after insert doc._id object HOT 4
- Support to Meteor 2.8 and Mongo async methods HOT 5
- After update hook does not use direct find HOT 2
- Async hooks run in parallel to the collection operation HOT 3
- Meteor 3.0 migration considerations HOT 1
- Ability to add call-level parameters to hooks HOT 1
- Core dump at Meteor 3.0 alpha 15: node: ../src/coroutine.cc:134: void* find_thread_id_key(void*): Assertion `thread_id_key != 0x7777' failed. HOT 2
- Calling Meteor.userAsync inside pub throws an error in meteor 3 beta HOT 3
- before hooks and async callbacks are not compliant with Meteor 3 promises HOT 4
- Throw in before.* should also cancel the operation HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from meteor-collection-hooks.