* Use cheap-to-clone types more
* Use IArray in NodeSeq & add IntoPropValue for &AttrValue
* Add function get_mut() on VChild to make things easier
* Use AttrValue in timer_functional example
* fix VList PartialEq
* extract implicit-clone as workspace dep and bump to 0.5.1
* docs: advocate using IArray and IMap instead of Vec and HashMap
* docs: AI translation for lifecycles.mdx in Japanese and simplified Chinese
---------
Co-authored-by: Mattuwu <syan4@ualberta.ca>
Simply add yew-router via cargo and hope that cargo figures out the
correct version. For most users referencing git directly is wrong
and might lead to annoying errors when compiling.
Before, there was even a comment to keep the version reference up-to-date which obviously did not work and seems unpractical.
* made <textarea> a void element
* added defaultvalue special attr to <textarea>
* updated error message when trying to pass children to textarea
* updated docs, fixed formatting
* fixed hydration test
* fixed suspense test
* fixed heading in docs
* fixed clippy warnings
* fixed SSR, added SSR test for precedence of value over defaultvalue
* fixing wasm-bindgen-test screwups & replacing deprecated function use
* Add use_ref
Works like use_mut_ref but doesn't forcibly wrap your type in `RefCell`,
so that users can handle more complex or specialized cases of interior
mutability.
* mention use_ref hook in docs
---------
Co-authored-by: Martin Molzer <WorldSEnder@users.noreply.github.com>
* remove ToHtml trait
* re-add display impls
* make Vec::clone expilit
* fix doc
* fix conflicting impls
Into<Html> and Display can't be implemented on the same type
* update docs
* blanket impl won't work here
* bring back `Vec<VNode>: IntoPropValue<VNode>`
* macro tests
* Revert "fix conflicting impls"
This reverts commit 52f3c1fa8174489ba9cc783d708a49cc7b9c90a4.
These impls are fine now
* make examples compile
* .clone() should be before .into()
* Rc VList
* Make use of ImplicitClone and AttrValue in example
(There is more work to do but it's complicated so I will do it in
another PR)
* Impl ImplicitClone on VChild
---------
Co-authored-by: Cecile Tonglet <cecile.tonglet@cecton.com>
* Update Children to use Html.
* Fix website.
* Update website/docs/advanced-topics/children.mdx
* add further reading section
---------
Co-authored-by: Muhammad Hamza <muhammadhamza1311@gmail.com>
* Fix div prop name in css.mdx
* Fix div prop name in yew/website/docs/concepts/basic-web-technologies/css.mdx
`styles` is a not existing property in the `div` component. Changed it to `style`
* Mention certain components must be children of Router
* make suggested changes
* fix typos
* update documentation with suggested changes again
* change /> to > in comment
* add ticks to Link & Switch in concepts/router.mdx
* Proposed Documentation Improvements
#### Retrieved from https://yew.rs/docs/concepts/wasm-bindgen#jsvalue on 9/24/2022
`JsCast` is nicely structured so far, although I thought this section was worded strangely.
> The `dyn_into` method will consume `self`, as per convention for into methods in Rust, __and the type returned is `Result<T, Self>` this means if the casting fails then the value in `Err` is so you can try again or do something else with the original type.__
I believe this edit conveys the original idea, but makes more sense to the reader:
> The
[`dyn_into`](https://rustwasm.github.io/wasm-bindgen/api/wasm_bindgen/trait.JsCast.html#method.dyn_into)
method will consume `self`, as per convention for into methods in Rust, and the type returned is
`Result<T, Self>`. This means if the casting fails then the `Self` value in `Err` is preserved. You could try again
or do something else with the original type.
* Update website/versioned_docs/version-0.19.0/concepts/wasm-bindgen/introduction.mdx
Co-authored-by: Kaede Hoshikawa <futursolo@users.noreply.github.com>
* update latest docs
Co-authored-by: Muhammad Hamza <muhammadhamza1311@gmail.com>
Co-authored-by: Kaede Hoshikawa <futursolo@users.noreply.github.com>
* fix portal shifting on reconciliation too often
the public vdom api changes to only allow directly
setting a Node as sibling (still optional) instead of a NodeRef.
This was the intention all along, since the NodeRef was
not dynamically tracked, and creating a portal into a subtree
already controlled by yew is not supported anway.
* fix feature soundness
* fix doc tests
* 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
* Update introduction.mdx
The `if else` example was syntactically correct, but had a semantic issue of not using the condition variable. Could lead to confusion if you are a newbie.
* Update conditional-rendering.mdx
changed if condition variable in html docs
* Note about tag casing and fixed example
* Added notes about tag casing
* Removed broken part of SVG example
* Slight change to SVG example
* removed some newlines
* Update website/docs/concepts/html/introduction.mdx
Co-authored-by: WorldSEnder <WorldSEnder@users.noreply.github.com>
Co-authored-by: WorldSEnder <WorldSEnder@users.noreply.github.com>
* RenderFn can be be directly Fn() now.
* Switch switch to function component.
* Make Link a function component.
* Remove non-exhaustive.
* Add migration guide.
* Update Website Docs.
* Fix CI.
* Pushing to Navigator no longer requires an owned instance.
* Fix CI.
* Fix code size.
* Further optimisation.
* 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