Question

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?

Était-ce utile?

La solution

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.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top