Bridges
Native - Bridge components: 3 building blocks HTML markup - where your server configures the component The Stimulus controller subclass - where messages are passed between web and native The native component - where Swift generates the UI and interacts with native APIs Build new bridge: Add the HTML markup use double dashes -- when referencing Stimulus controller --> allows us to namespace our bridge component controllers under the bridge/ directory, keeping them separate from traditional Stimulus controllers. Create a Stimulus controller Create a native component Respond to Button Taps On the web, we used send() to pass a message to native code. To pass a message _from _ native code to the web we have reply(to:).

Native -
Bridge components:
3 building blocks
- HTML markup - where your server configures the component
- The Stimulus controller subclass - where messages are passed between web and native
- The native component - where Swift generates the UI and interacts with native APIs
Build new bridge:
- Add the HTML markup
use double dashes -- when referencing Stimulus controller --> allows us to namespace our bridge component controllers under the
bridge/
directory, keeping them separate from traditional Stimulus controllers. - Create a Stimulus controller
- Create a native component
Respond to Button Taps
On the web, we used send()
to pass a message to native code. To pass a message _from _ native code to the web we have reply(to:)
.