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

Update README.md #276

Closed
Cyperwu opened this issue Apr 8, 2020 · 4 comments
Closed

Update README.md #276

Cyperwu opened this issue Apr 8, 2020 · 4 comments
Labels
question Further information is requested

Comments

@Cyperwu
Copy link

Cyperwu commented Apr 8, 2020

The example in current README.md does not comply to the code of the Counter example, please update.

@hecrj
Copy link
Member

hecrj commented Apr 8, 2020

I don't believe it needs any updating. Could you elaborate?

The overview in the README is meant to be a quick introduction to the architecture and ideas the library is built on.

The documentation of the Application trait provides a full example.

@hecrj hecrj added the question Further information is requested label Apr 8, 2020
@Cyperwu
Copy link
Author

Cyperwu commented Apr 8, 2020

@hecrj The sample code in the README is brief, but it's not complete.

In fact, the counter example uses Sandbox trait to give a quick and simple demo, and which is also recommended in the docs.

But in the README, you didn't impl Application or Sandbox, which may lead to some level of confusion.

Also, on line 114 of the README, the view method returns Column instead of Element. It may imply that this piece of code belongs to a part of a bigger application, but not an Hello World that can be easily run through.

Maybe using the hello world code sample in the Sandbox documentation would be better?

@hecrj
Copy link
Member

hecrj commented Apr 8, 2020

The sample code in the README is brief, but it's not complete.

That's the whole point, it's not meant to be complete. It's an overview; an introduction that focuses on the different concepts of The Elm Architecture.

you didn't impl Application or Sandbox, which may lead to some level of confusion.

These traits are not the only way to use the library.

Also, on line 114 of the README, the view method returns Column instead of Element. It may imply that this piece of code belongs to a part of a bigger application, but not an Hello World that can be easily run through.

It does say overview instead of full example, though... It also links to the documentation and the examples at the end.

Maybe using the hello world code sample in the Sandbox documentation would be better?

The counter example works well to introduce the concepts because it is interactive and very simple. It's also the first example introduced in the Elm guide.

@Cyperwu
Copy link
Author

Cyperwu commented Apr 8, 2020

Alright then, I understand your concept. Thanks for your time!

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

No branches or pull requests

2 participants