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

Add a hello world example #2647

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

hydra
Copy link

@hydra hydra commented Oct 24, 2024

When I attempted to learn Iced I looked for a hello world example that doesn't have/need/use any kind of state, I just wanted a basic window with some text on it. I did not find such an example, so I made this one.

What was interesting is that the framework forces you to define a Message type and an update method which uses the Message type, but the Hello World case does not have any messages or state. You also have to return something from the update method, again forcing you to use additional types that I didn't expect to have to learn about for a "Hello world" example. i.e. Task.

Hope this helps others looking for a simpler example than the 'Counter' example.

@alex-ds13
Copy link
Contributor

This was already suggested previously. Here is the response of the maintainer: #2434 (comment)

@hydra
Copy link
Author

hydra commented Oct 24, 2024

This was already suggested previously. Here is the response of the maintainer: #2434 (comment)

Interesting, happy to note I wasn't the first person looking for one!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants