* Try to add wasi feature to avoid browser's ABI.
* Add async render for single-threaded env.
* Temporarily enable my own patch branch.
It would be modified later
after the corresponding library branches are merged.
* add example for WASI SSR.
* Ready to run WASI on wasmtime.
* complete the example
* fix fmt
* fix fmt
* I made a mistake..sry
* add yew-router suites for demo
* fix typo
* Make the async render stream function public
* Use target_os instead of feature.
* Renew gloo-history's patch.
* Exclude WASI example to avoid web-sys.
* Try to add CI for WASI example.
* Fix CI.
* Fix CI that requires compiler 1.67 or newer.
* Use CLI's flag instead of exclude example.
https://github.com/bytecodealliance/wasmtime/pull/4312
* Remove patchs.
* Use LocalServerRenderer instead of ServerRenderer.
https://github.com/yewstack/prokio/pull/11#issuecomment-1847979933
* Remove unused exports.
* Add description about `LocalServerRenderer`.
* fix fmt
* fix fmt
* Update Cargo.lock
* Bump rust compiler's version to 1.67...
* Exclude WASI on yew-router browser interfaces.
* fix fmt
* Wait for gloo's PR dealed.
* Rollback to rust compiler 1.64.
cc https://github.com/rustwasm/gloo/pull/423#issuecomment-1848353295
* Fix lock file.
* Downgrade `toml_datetime` version.
* Fix enum for `gloo-history`.
* Well, it seems there is no way to avoid the MSRV upgrade....
* fix: Replace feature = "wasi" to target_os = "wasi".
* Remove tips for rust version.
* Bump `gloo` to 0.11.
* Try to test yew-macro on compiler 1.67.
* Try to use compiler 1.68 instead.
* Try to use compiler 1.69 instead......
* Revert MSRV back
* Pin the oldest Cargo.lock.
* Downgrade deps for MSRV.
* Bump benchmark tool's tokio to 1.35
* Try to write WASI CI.
* Rollback the quotes
* Combine CI files...
* Rollback the use that gloo-history has fixed it.
* fix
* Bump gloo-history version.
* Block raw html update tests on WASI.
* Rollback indexmap's version.
* fix CI
* fix CI
* Update some SSR test suites that replace ServerRender instead of LocalServerRender.
* Remove yew-router's cfg macro
* Fix fmt
* Try to fix CI
* Update examples/wasi_ssr_module/README.md
Co-authored-by: Elina <imelina@elina.website>
* Revert back some unnecessary changes.
* Clippy
* fmt
* Fix CI.
* Fix CI.
* Try to fix clippy.
* Fix `ToString` trait.
* Remove pin version of WASI CI test.
* Pin the newer version.
* Fix typo.
* Bump `wasm-bindgen`.
* Fix SSR example.
* Fix typo.
* Try to support non-browser environments.
* Update wasm-bindgen-test to 0.3.43
refer to rustwasm/wasm-bindgen#4083
* fix doc test running on nightly
* Update website/docs/advanced-topics/server-side-rendering.md
Co-authored-by: WorldSEnder <WorldSEnder@users.noreply.github.com>
* Update WASI CI.
* Remove WASI test for rustc 1.76.
* Try to let `wasmtime` CLI can be executed.
* Limit the function `decode_base64` that it shouldn't runnable in non-browser environment.
* Remove WASI example test for rustc 1.76.
* Revert changes.
* Fix CI
* Fix Cargo.lock
* Remove unused deps
* Undo the formatting changes.
* Undo the formatting changes.
---------
Co-authored-by: Elina <imelina@elina.website>
Co-authored-by: Martin Molzer <WorldSEnder@users.noreply.github.com>
* Add `--open` to `boids`
* Added running instructions to `contexts`
* Amended `counter` instructions
- Added `--open` flag
- Removed unnecessary instructions on how to run with `release` profile
* Amended `counter_functional` instructions
- Added `--open` flag
- Removed unnecessary instructions on how to run with `release` profile
* Amended `dyn_create_destroy_apps` instructions
- Added `--open` flag
- Removed unnecessary instructions on how to run with `release` profile
* Added running instructions to `file_upload`
* Added running instructions to `function_memory_game``
* Amended `function_router` instructions
- Amended `release` profile instructions
- Added `--open` flag
* Added running instructions to `function_todomvc`
* Added running instructions to `futures`
* Added running instructions to `game_of_life`
* Added running instructions to `immutable`
* Added running instructions to `inner_html`
* Added running instructions to `js_callback`
* Amended `keyed_list` instructions
- Added `--open` flag
- Amended `release` profile notice
* Added running instructions to `mount_point`
* Added running instructions to `nested_list`
* Added running instructions to `node_refs`
* Amended `password_strength` instructions
- Added `--open` flag
- Amended `release` profile notice
* Added running instructions to `portals`
* Amended `router` instructions
- Added `--open` flag
- Amended `release` profile notice
* Amended `simple_ssr` instructions
- Simplified wording
- Removed unnecessary notes
- Changed commands so that they should be executed from the `examples/simple_ssr` directory like every other example
* Amended `ssr_router` instructions
- Removed unnecessary notes
- Changed commands so that they should be executed from the `examples/ssr_router` directory like every other example
* Added running instructions to `suspense`
* Added running instructions to `timer`
* Added running instructions to `todo_mvc`
* Added running instructions to `two_apps`
* Added running instructions to `web_worker_fib`
* Added running instructions to `webgl`
* Amended various examples
- Simplified running instructions
- Moved running instructions to the bottom of each `README.md`
* Amended `examples/README.md` instructions
- Added `release` profile notice
- Added `--open` flag
- Removed `--release` flag
* Apply grammar suggestions from code review
Co-authored-by: Kaede Hoshikawa <futursolo@users.noreply.github.com>
* Update examples/function_router/README.md Grammar
Co-authored-by: Kaede Hoshikawa <futursolo@users.noreply.github.com>
* Add Grammar Suggestions from Review
* Apply Spelling Suggestion
Co-authored-by: Kaede Hoshikawa <futursolo@users.noreply.github.com>
---------
Co-authored-by: Kaede Hoshikawa <futursolo@users.noreply.github.com>
* Fixed `README.md` list of examples
- Added all communication examples
- Reordered into alphabetical order to match the examples directory
- Added `ssr_router` to the list
- Added `function_router` to the list
- Unified full stop usage
* Added file extension
* Improved List Legend
* Small Changes to Section Headings
* Apply suggestions from code review
Co-authored-by: WorldSEnder <WorldSEnder@users.noreply.github.com>
* Table Alignment Fixes
* Incorporate Suggestion
Co-Authored-By: WorldSEnder <WorldSEnder@users.noreply.github.com>
* Removed Old Legend
Co-Authored-By: WorldSEnder <WorldSEnder@users.noreply.github.com>
---------
Co-authored-by: WorldSEnder <WorldSEnder@users.noreply.github.com>
- Remove agents example
- Agents example is replaced by web_worker_fib as they both serve the same purpose now that trunk 0.15 has been released
- Clean up CI setup and ensure that examples are deployed in publish-examples.yml as they're built in size-cmp.yml
* improve js_callback example
it now loads two modules:
1. imp.js
2. unimp.js
imp.js is loaded at page load whereas unimp.js is loaded when requested. A fallback is displayed during loading using Suspense
* Hash is not hardcoded anymore
* pre_build hook to build the post build hook binary
* fmt
* add .gitignore for trunk_post_build executable
* move js imports to bindings module, upadte README
* simple counter application with functional components
* clean up some comments
* use the word 'function' instead of 'functional'
Co-authored-by: Muhammad Hamza <muhammadhamza1311@gmail.com>
* add the counter functional example package to workspace root cargo toml
* add data-trunk link tag in index html
* include counter functional into the examples readme file
Co-authored-by: Muhammad Hamza <muhammadhamza1311@gmail.com>
* Remove crm example
* Add password_strength example
* Update README
* Remove .DS_Store
* Update README
* Cargo fmt
* Apply suggestions from code review
* Update list of examples
* update the pr to work with latest master
* fix readme
* add newline
Co-authored-by: Simon <simon@siku2.io>
Co-authored-by: Julius Lungys <32368314+voidpumpkin@users.noreply.github.com>
* feat(examples): add function components todo example
* chore(examples): apply feedback for function components example
* chore(examples): apply more feedback for function components example
* feat(examples): implement custom hook for edit boolean toggle
* chore(examples): prep for merge, add more documentation
* chore(examples): add more descriptive comment to function component hook, fix cargo.toml
* Naive implementation of destroy app
* Move functions get_component_link and destroy
The function get_component_link and destroy on App does not require
Component::Properties to be Default. So move them to their own impl
block.
* Change the fn signatures for the other mount fns too
* Add example of how to use the apps dynamically
* Rename example
* Change title of example html file
* Update examples/dyn_create_destroy_apps/src/counter.rs
Co-authored-by: Simon <simon@siku2.io>
* Change fn signatures of App to not take Self
* app.rs thorugh to public API: only make it possible to create an
instance of an App by mounting it. And only make it possible to mount
an App by creating it. This prevents double mounting.
* Change Scope::mount_in_place to take &self instead of self, because it
doesn't have too.
* Fix examples to compile with new App signature
* Fix tests to compile with new App signature
* Remove pub pulic App::mount* API
* Make the documentation compile again with the new start_app API
* Make the examples compile again with the new start_app API
* Make the yew packages compile again with the new start_app API
* rename module yew::app to yew::app_handle
* Fix identation in styling file for dyn_create_destroy_app ex
* Fix naming in examples/dyn_create_destroy_apps/README.md
Co-authored-by: Simon <simon@siku2.io>
* Use Self instead of AppHandle to create AppHandle
Co-authored-by: Simon <simon@siku2.io>
* Fix the start_app_in_body docs
Co-authored-by: Simon <simon@siku2.io>
* Remove comparison with Elm in the start_app docs
Co-authored-by: Simon <simon@siku2.io>
* Fix english in dyn_create_destroy_apps example
Co-authored-by: Simon <simon@siku2.io>
* Impl Deref instead of AsRef for AppHandle
* Formatting
* Remove AppHandle::new use Default trait instead
* Rename the Yew::start_app* function names
* Revert "Remove AppHandle::new use Default trait instead"
This reverts commit 97e4897c1edafac34e012f13bc2b5084f68f8dce.
* remove default impl for AppHandle
* Make the tests compile again
* Make the examples compile again
* Add dyn_create_destroy_apps to examples/README.md
* Remove mount_to_body_with_props
Co-authored-by: Simon <simon@siku2.io>
* Use yew getters instead of query selectors
Co-authored-by: Simon <simon@siku2.io>
* Remove AppHandle::new
* Remove unused function
* code style fix
* Fix compile error
* Add func set_custom_panic_hook
This commit adds the function set_custom_panic_hook. In addition Yew
will now check if a custom panic is registered when one of start_app*
functions are called, if that is not the case a default panic hook is
registered.
* Fix docs for set_custom_panic_hook
Co-authored-by: Simon <simon@siku2.io>
Co-authored-by: Nicklas Warming Jacobsen <nwj@skybox.gg>
Co-authored-by: Simon <simon@siku2.io>
* remove old files
* update counter
* update crm example
* Add readme for counter
* update custom_components
* update webgl example
* update two_apps
* update todomvc
* mark special case multithread
* update dashboard
* update examples readme
* file_upload example
* fragments example
* futures example
* game_of_life example
* inner_html example
* js_callback example
* keyed_list example
* remove large_table
* remove minimal
* mount_point example
* I can't count apparently
* nested_list example
* node_refs example
* timer example
* store example
* pub_sub example
* rip npm_and_my_sanity
* use a title™️
* clean up multi_thread
* fix format
* boids part 1
* boids part 2
* add workflow
See: <https://github.com/siku2/yew/pull/13>
* remove my little scratchpad again
* add boids to examples table
* runtime-generated list in nested_list example
* update workflow
* first batch of yewtil examples
* clippy "futures"
* remove old yew-router examples
* add a new router example to the main examples
* remove remaining yewtil examples
* more progress
* update for testing purposes
* author list
* improve content generation
* revert this mistake
I thought it would be great to use `unimplemented!()` in case the component doesn't have any properties.
This helps avoid the mistake of forgetting to update the change method when adding props later on.
What I didn't consider is that just because the props are () that doesn't mean that Yew isn't going to call it...
So yeah, it's still a good idea for update, but certainly not for change.
* missed a few
* turn router switch example into test
* seems to be working
* make it possible to host the router example on a sub-path
* create a 404 file for SPA
* remove the three examples and update table
* remove the 404 file because it isn't working anyway
* fix small router issue relating to the sub-path hack
* yewtil::store send state on connection
* elaborate store behavior
* rework the store example
* add readme for store example
* tiny formatting adjustment
Co-authored-by: Simon <simon@siku2.io>
* remove static directory, move script to run_example.sh
* gitignore
* server infra
* Support --build-only
* fix npm_and_rest example
* Fix various static index.html's
* Fix spacing
* newlines at the end
* Cleanup
* tabs -> spaces
* line ending
* remove build_examples.sh
* Apply suggestions from code review
Co-authored-by: Simon <simon@siku2.io>
* format file and improve EXIT trap
Co-authored-by: Simon <simon@siku2.io>
* Update run instructions
`python3 -m http.server --directory` flag was added in Python 3.7.
Change instructions to cd into static and skip the flag instead -
makes it work with earlier Pythons too.
* Add visual feedback for button click
The minimal example has a button, but clicking it does nothing. This
makes it hard to tell whether the example works or not.
This adds a label that is update when the button is clicked.
* Small improvements to crm example
* Add a heading to each scene to make it more obvious what the page is
for.
* Improve layout of input form by stack the inputs vertically.
* Add a little space between entries when displaying the list.
* Add a hint to the Description input that Markdown can be used.
* Add an explanation to the file_upload example
* Clarify purpose of var in fragments example
* Improve futures_wp example
* Add a second button that demonstrates an unsuccessful fetch.
* Render the markdown document (since we're fetching markdown after
all).
* Remove vague comment that's not really helping.
* Improve inner_html example
* Include a textual explanation of what the example is doing.
* Run cargo fmt
* Remove 'static lifetime for constant
* Improve suggestion in inner_html example
* move markdown.rs to a common crate
* add description to common Cargo.toml
* PR feedback
* PR feedback
* remove static lifetime annotation