meteor-collection-timestampable icon indicating copy to clipboard operation
meteor-collection-timestampable copied to clipboard

Create fields on client-side as well

Open nicooprat opened this issue 8 years ago • 1 comments

I guess createdAt & createdBy weren't created client-side to avoid data manipulation, but hooks are ran client and server side, like methods, so datas can't be corrupted (if so, server side will insert correct datas and sync all clients with them).

Not having these two fields client-side created some glitches and I had to test if they were present. For example, I couldn't display a comment's author username before server sync. More code for me, weaker experience for users.

That said, I may have misunderstood why you did this though! :)

nicooprat avatar Jul 14 '16 11:07 nicooprat

I believe it was so that one could manually set the createdBy and createdAt on creation but I'll have to look it over.

zimme avatar Jul 14 '16 11:07 zimme