* update: Promote use of AttrValue instead of String or Rc<String>
* update: Also mention AttrValue in the elements' page
* format: ran fmt:write to correct formatting issue
* fix: refactor doc comments to conform to compiling rules
* Read through the docs and correct spelling and grammar
* Run prettier
* Apply review suggestions
Co-authored-by: Muhammad Hamza <muhammadhamza1311@gmail.com>
* adjust translation messages
Co-authored-by: Muhammad Hamza <muhammadhamza1311@gmail.com>
* Docs overhaul part2
* fix links and require them for CI
* remove translations for 0.17
* remove a bunch of unused documentation
* run prettier
* fixup links and locations of some translations
* add prettier
* ci
* run prettier
* run prettier in CI
* run prettier --write
* ignore README.md
* specify googleAnalytics
* fmt
* npm run write-translations
* fmt
* ignore i18n json files
they're autogenerated and don't like being formatted
* post merge fixes & some updates
* post merge fixes
I was originally going to put a PR to fix "has not side-effects", but I also re-read this sentence and realized it could be interpreted as saying a pure function returns its parameters, not a deterministic value based on its parameters.
* Convert components concept docs from SC to FC
- moved struct components to advanced topics
- added docs about HOC for Suspense and Context
- added a ease-in topic before components that introduces
HTML/CSS/JS in yew
- edit components concept to use function components
* translations
* fix todo links
* fix tests
* spelling bee
* Make Html a Result.
* Fix tests.
* Implement Suspense.
* Schedule render when suspension is resumed.
* Shift children into a detached node.
* styled example.
* Update wording a little bit.
* Move hint to hint.
* Add some tests.
* Fix clippy.
* Add docs.
* Add to sidebar.
* Fix syntax highlight.
* Component -> BaseComponent.
* Html -> VNode, HtmlResult = RenderResult<Html>.
* Suspendible Function Component.
* Add a method to create suspension from futures.
* Revert extra changes.
* Fix tests.
* Update documentation.
* Switch to custom trait to make test reliable.
* Fix file permission.
* Fix docs.
* Remove log.
* Fix file permission.
* Fix component name error.
* Make Suspension a future.
* change suffixes from md to mdx
fix broken links for English locale
tree shake and update docusaurus
add docusaurus ideal image plugin
use svg and themed image
delete unused static asset
* move localized landing page
* change GitLocalize project page
* nit pick
* remove ignore to have the block checked
* Refactor use ref hooks
`use_ref` has been renamed to `use_mut_ref` and `use_ref` has become a
similar hook for immutable reference.
This is different from React but I think lines up nicely with Rust as a
reference is immutable unless specified to be a mut ref.
* fix CI
Co-authored-by: Hamza <muhammadhamza1311@gmail.com>
* Remove `web_sys` re-export
Removes re-exporting the `web_sys` dependency from the yew crate and
removes some `web_sys` features that were only enabled for re-exporting.
* re-export events through yew::events
* Add doc-test to test website code snippets
Heavily inspired by tokio-rs/website repo.
* Fix code snippets to pass doc tests
Some code snippets are explicitly ignored and some are not run
to avoid having to include dependencies for one liners.
* Add website code snippet tests to CI
* Fix CI
* Remove doc-test from workspace
* Exclude doc-test from workspace
* Refactor code snippets and tests
Code snippets can import types from doc_test crate i.e.:
```rust
use doc_test::agents::EventBus;
```
This allows for moving some boilerplate away from the example and still
checks that the code compiles correctly.
Also some slight changes to some of the examples and the information
about `ComponentLink` which is deprecated.
* Move doc-test to packages
* Rename doc-test crate to website-test
The new name makes it more clear the purpose of this crate.
* fix ci