Classes
The following classes are available globally.
-
A server managing connections with client browsers providing a user interface via HTML.
See moreDeclaration
Swift
public class SwiftWebServer
-
A property wrapper type that can read and write a value managed by SwiftWeb.
SwiftWeb manages the storage of any property you declare as a state. When the state value changes, the view invalidates its appearance and recomputes the body. Use the state as the single source of truth for a given view.
A State instance isn’t the value itself; it’s a means of reading and writing the value. To access a state’s underlying value, use its variable name, which returns the
wrappedValue
property value.You should only access a state property from inside the view’s body, or from methods called by it.
See moreDeclaration
Swift
@propertyWrapper public class State<Value> : TypeErasedState