Skip to content
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

Tracking issue for nightly requirement? #74

Open
nuke-web3 opened this issue Feb 23, 2024 · 2 comments
Open

Tracking issue for nightly requirement? #74

nuke-web3 opened this issue Feb 23, 2024 · 2 comments
Labels
nightly Things that need to be changed to use the stable syntax by default.

Comments

@nuke-web3
Copy link
Contributor

nuke-web3 commented Feb 23, 2024

https://book.leptos.dev/getting_started/index.html#hello-world-getting-set-up-for-leptos-csr-development has a reference to needing nightly, is there a rust-lang tracking issue open that could be referenced there? I for one would like to subscribe to it and others may want to learn more specifics that are blocking using all of leptos with stable.

@gbj
Copy link
Contributor

gbj commented Feb 23, 2024

You can use all of Leptos with stable. The nightly feature enables the function-call syntax for signals, which is used in the book because it helps develop the mental model (reactivity = functions) and because I think it's much more convenient in many cases.

If you want to use Leptos with stable, you just need to mentally prepare to swap in foo.get() for foo(), and on occasion to turn a plain foo into move || foo.get() if something like a component prop requires a function.

The nightly traits used are unboxed_closures and fn_traits. auto_traits and negative_impls are used for some parts of the API in the router crate and elsewhere.

@nuke-web3
Copy link
Contributor Author

nuke-web3 commented Feb 23, 2024

Thanks for the details!
I have yet to actually dig into building with Leptos to see how impactful that trade off is, seems reasonable to try stable and find out.

For others curious these would be helpful to give context on the reasons nightly is needed (Perhaps adding a note in the book with these links would be useful too):

Seems that based on this, it isn't likely all those features will hit stable anytime soon. So nightly will be required for the foreseeable future. yea?

@gbj gbj added the nightly Things that need to be changed to use the stable syntax by default. label Mar 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
nightly Things that need to be changed to use the stable syntax by default.
Projects
None yet
Development

No branches or pull requests

2 participants