Web · APIs and utilities
License
Sets the license key.
3 exports
Import
setLicenseKey
functionSets the license key. Usually UIProviderProps.licenseKey is enough; in setups that do not use the provider, call this at the app's entry point, before the first paint.
Examples
isLicenseFree
functionIs this a development environment (no license needed)? Either of:
- A development build on a development host: the bundler's
NODE_ENVis"development"or"test", React is its development build (the two must agree, so a forcedNODE_ENVis not enough), and the page is on the local machine, the local network, a development domain (.local,.test…), a browser-based IDE or a tunnel (seeisDevHost). - Any build served from the local machine on an explicit port over http(s), e.g.
next startonlocalhost:3000. Apps that package the site underlocalhostwithout a port (Capacitor, Tauri) are not covered.
getLicenseStatus
functionResult of the last license check; undefined if no check has run yet or the environment is development.