yew/examples/js_callback
Allan b3f8ca1920
Replace Model with App or MyComponent (#2336)
`Model` is ambiguous and not a user-friendly name.
Some of the newer docs are already referring to the root component as
`App`.

This PR follows this naming scheme:
 - `App` for a root component
 - `MyComponent` for an arbitrary component

This naming is inspired by the React docs.

i18n references were not changed. They need a larger rewrite which will
go in a separate PR.
2022-01-07 20:50:21 +05:00
..
2021-09-27 02:07:38 +02:00
2020-10-10 23:58:34 +02:00
2020-09-22 00:17:48 +02:00

Js Callback Example

Demo

Concepts

The example uses wasm-bindgen to import functionality from Javascript. To learn more about the subject, refer to "The wasm-binden Guide".

Improvements

This example is a purely technical demonstration and lacks an actual purpose. The best way to improve this example would be to incorporate this concept into a small application.

  • Do something more complex in the Javascript code to demonstrate more of wasm-bindgen's capabilities.
  • Show a loading indicator while waiting after pressing "Get the payload later!".
  • Improve the presentation of the example with CSS.