سؤال

I'm using Trigger.io's forge.prefs module to store user options. The documentation refers to "default values" for preferences a few times:

forge.prefs.set(name, value, success, error)

The preference value given here will override a default value (if one was given).

However, I can't anything in the docs that actually says how to set this default value.

How do you set a default value for a preference?

هل كانت مفيدة؟

المحلول

Have a look at the trigger.io tutorial on creating a weather app in particular the section Using remembered locations as a strategy for setting a default preference value.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top