-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Features expected for 1.0 version #136
Comments
Yeah these features will make it actually usable for a serious project. Right now I can only do some small applications. Also something like high order components/render props/children like react would be good so that we can make more parts of the app declarative. |
React deprecated string refs (it's a legacy feature now) and recommends callback refs and object refs instead. |
Waiting for compiler plugin ... |
For point 1, as memtion in #128 by DenisKolodin:
and I support for component restriction. But it should Render more easy, and hope to just like writing HTML DOM tree. |
Here is I'm finally gathered all my ideas as PoC in one place. Please check it. If you have some ideas how it can be integrated into |
Yew 1.0 UpdateWe are getting closer to releasing a v1.0 version of Yew and I wanted to address some of the requests here and provide updates :)
Nested Components v1 was completed in #589 and will be matured in v2 here #756 (along with the removal of generics in the virtual dom)
Fixed here: #583
Fixed here: #500
Yes, this would be nice, but AFAICT not easy to implement. May come in the future 🤷♂ I created an issue here: #757
Mentioned already, but fixed here: #589
Fixed here: #715
Yeah, I think this is a good idea, created an issue here: #758 I'm going to close this issue in favour of the 2 new issues I created. Thanks for writing this up @andreytkachenko! |
Hello, recently I have played with this framework and find it very interesting. I would be happy to use it. But right now it is not ready for real usage and here I'll will try to summarize all key features (fixes) expected for release version of the library.
1. Collections of Renderable of different type
Currently trait Renderable depends on component, but it is a huge limitation not allowing to create a collection of different kind of components and also not allowing to create nested components (Issue #128) (create container components like Tabs, Stacks, etc.), so ideally Renderable trait should looks like:
Why is it possible?
Component is required only(AFAIK) for handling listeners (precisly for handle result type from listener callback) and for handling props changes. Those two things may be done in the component itself rather then in the library (or some how another way).
2. React syntax
A lot of people got used to use React syntax, and this library has to keep close to it as much as possible, so here is as example:
should looks like:
Reacts
componentDidMount
analogI think it will be good to exted
Renderable
trait:Get rid of all confusing commas and semicolons
here are the issues #98, #127
I suspect it may be solved by a compiller plugin (as @deniskolodin mentioned in #127).
Allow raw text nodes
I don't see any limitations from rust to make it
Components should be able to have a body
React's references to elements (virtual nodes)
3. Move virtual dom part into seporate crate
Why?
Because it would be great to use such react's style with different backends, like stdweb (for web) or GTK (for desktop). I suppose #108 may be easily solved by HTML rendering backend.
The text was updated successfully, but these errors were encountered: