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

docs: walkthrough of the client libraries #1401

Closed
wants to merge 4 commits into from
Closed

Conversation

qbzzt
Copy link
Contributor

@qbzzt qbzzt commented Sep 6, 2023

No description provided.

@changeset-bot
Copy link

changeset-bot bot commented Sep 6, 2023

⚠️ No Changeset found

Latest commit: 79a87ea

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Member

@alvrs alvrs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the explanations in here! I almost wonder if it would make sense to have these as comments in the actual files instead of separately. (Thinking of how to keep this walkthrough in sync with the actual files, and people would probably first look in the file that's created in their project before looking on the docs page.) For now we can merge it as is to be able to point people to this page if they care about the files that are created when starting a MUD template.

@@ -0,0 +1,381 @@
# The MUD client libraries

In this code walkthrough you learn how the MUD client libraries function.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I hear "MUD client libraries" I think of the libraries in MUD, while the files in the mud directory are mostly boilerplate that has to live in the project for various reasons, but we're trying to reduce the amount of boilerplate that has to live in the project because projects can't update it like other files.

I'd probably call these files something like "client template setup files"


The type definition for the return type of `setup`.
The result is an [`Awaited`](https://www.typescriptlang.org/docs/handbook/utility-types.html#awaitedtype), which means it may be the result of an input/output operation that is not immediately available.
The `Awaited` result uis of type `ReturnType<typeof setup>`, which means that TypeScript will see the type that the `setup` function returns and use that.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The `Awaited` result uis of type `ReturnType<typeof setup>`, which means that TypeScript will see the type that the `setup` function returns and use that.
The `Awaited` result is of type `ReturnType<typeof setup>`, which means that TypeScript will see the type that the `setup` function returns and use that.

The one you see here is to get on the `anvil` test network by default

{
// ** GOON link to how to change it when https://github.com/latticexyz/mud/pull/1369 is merged **
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does GOON mean in this context? 😄

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Go on. I use it as a note for myself.

docs/pages/tutorials.mdx Outdated Show resolved Hide resolved
@qbzzt
Copy link
Contributor Author

qbzzt commented Sep 6, 2023

I like the explanations in here! I almost wonder if it would make sense to have these as comments in the actual files instead of separately. (Thinking of how to keep this walkthrough in sync with the actual files, and people would probably first look in the file that's created in their project before looking on the docs page.)

Then let's just do that. Do I need to PR changes into each of the templates separately, or are those files all coming from a single source somewhere?

Co-authored-by: alvarius <alvarius@lattice.xyz>
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