edemaine / solid-meteor-data

Integrating SolidJS and Meteor reactivity
MIT License
16 stars 2 forks source link

createUser #10

Open edemaine opened 8 months ago

edemaine commented 8 months ago

Wrapping Meteor.user() seems common enough to design its own little helper. We could provide an API that creates a Store by default, but can be skipped via noStore: true just like createFind.

In the documentation, we should recommend calling createUser just once at the global level, and re-using it (at least without SSR). It doesn't need to be created in each component.

Maybe also createUserId, which is really simple.

Perhaps something similar for accessing Meteor's Session globals?