-
-
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
Refactor and cleanup codebase #1842
Conversation
Visit the preview URL for this PR (updated for commit 574034d): https://yew-rs--pr1842-refactor-52ya3hc1.web.app (expires Sun, 25 Jul 2021 10:24:44 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 |
4e0ba13
to
35c0428
Compare
This PR is ready for review. I have left out moving |
957d633
to
5d5e49c
Compare
plus a couple of misc fixes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The function component macro tests seem to have been deleted and not moved to yew_macro.
The following example's READMEs have references to either yewtil or services:
- General README for examples refers to the 'reader service' for the
file_upload
description - boids
- crm
- file_upload
- futures
- game_of_life
- router
- store
- timer
- todomvc
The Elements page under the Listeners heading has a code snippet that uses ConsoleService
Elements.md L135
It would be nice to add a section about callback_future
on the Callbacks doc page.
Is it worth removing the warning on the Function Components Introduction page as function components are being moved into the yew
crate?
Co-authored-by: mc1098 <[email protected]>
Fixed those.
I think that can come later, this PR is already huge and mainly focuses on refactor.
Yes, removed it. |
# Conflicts: # examples/todomvc/README.md # packages/yew-functional-macro/tests/function_attr/generic-props-fail.stderr # packages/yew-macro/tests/html_macro/block-fail.stderr # packages/yew-macro/tests/html_macro/iterable-fail.stderr
missed those before
@mc1098 feel free to take a look again, I made the changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple of links to add to gloo
references but that's it :D
Co-authored-by: mc1098 <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me :D
Hello everyone, what's the repleacement of https://yew.rs/concepts/services/fetch ? |
#1841 mentions them. |
use serde_derive::{Deserialize, Serialize}; | ||
use yew::format::{Json, Nothing, Toml}; | ||
use yew::{html, Component, ComponentLink, Html, ShouldRender}; | ||
use yew_services::fetch::{FetchService, FetchTask, Request, Response}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was the dashboard example mainly removed because it used FetchService
? It caught my attention as being one of the only examples that included both server and client code.
Is there any similar example? Would it be worth rebuilding this one with updated services?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fetch isn't part of Yew anymore so I don't think there should be an example whose core functionality relies on an external library. I would like to add one in reqwasm
though (ranile/reqwasm#11), which can be used to make fetch requests.
Description
Fixes (part of) #1841
Fixes #885 (by removing the service altogether)
Checklist
cargo make pr-flow