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: Optimized readme.md code format #1681

Merged
merged 3 commits into from
Jan 13, 2023
Merged

Conversation

AwesomeDevin
Copy link
Contributor

Summary

Optimized readme.md code format

Check List

  • [x ] yarn run prettier for formatting code and docs

Optimized code format

fix: formatting readme

Revert "fix: formatting readme"

This reverts commit 0770813.

docs: formatting readme.md

fix: formatting readme

Revert "fix: formatting readme"

This reverts commit 0770813.

docs: formatting readme.md
@vercel
Copy link

vercel bot commented Jan 11, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
jotai ✅ Ready (Inspect) Visit Preview Jan 13, 2023 at 0:28AM (UTC)

@codesandbox-ci
Copy link

codesandbox-ci bot commented Jan 11, 2023

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit cf4fdb5:

Sandbox Source
React Configuration
React Typescript Configuration
React Browserify Configuration
React Snowpack Configuration
Next.js Configuration
Next.js with custom Babel config Configuration
React with custom Babel config Configuration

@dai-shi
Copy link
Member

dai-shi commented Jan 11, 2023

The partial code is intentional to reduce the lines of readme. Does it seem too confusing?

btw, I didn't know prettier didn't work for readme.md.

readme.md Outdated

function Status() {
// Re-renders the component after urlAtom changed and the async function above concludes
const [json] = useAtom(fetchUrlAtom)
}
Copy link
Member

Choose a reason for hiding this comment

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

This one looks a bit strange.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You're right ~,Can I replace it with this ?

function Status() {
  // Re-renders the component after urlAtom changed and the async function above concludes
  const [json] = useAtom(fetchUrlAtom);
  useEffect(()=>{
    // Logical processing base on json
    console.log(json)
  },[json])
  return <div>Content</div>;
}

Copy link
Member

Choose a reason for hiding this comment

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

That seems over-complicated. We want to keep readme very compact, and move detailed things into ./docs/.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Got it , thanks .

@AwesomeDevin
Copy link
Contributor Author

The partial code is intentional to reduce the lines of readme. Does it seem too confusing?

btw, I didn't know prettier didn't work for readme.md.

The partial code looks a little uncomfortable, Maybe it's just my personal habit ~ 😂 

@dai-shi
Copy link
Member

dai-shi commented Jan 12, 2023

Maybe it's just my personal habit

I heard similar comments in zustand, so you are not alone, though.

readme.md Outdated
Comment on lines 56 to 59
<button onClick={() => setCount((c) => c + 1)}>one up</button>
</h1>
)
}
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
<button onClick={() => setCount((c) => c + 1)}>one up</button>
</h1>
)
}
<button onClick={() => setCount((c) => c + 1)}>one up</button>
...

How about adding ... to make it explicit that it's partial code?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good idea~ , It works

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Shall I modify it and commit merge request again?

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, please modify entirely with the said policy.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Got it~!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's done, but some places } seem more suitable, use } instead of ....

Copy link
Member

@dai-shi dai-shi left a comment

Choose a reason for hiding this comment

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

Getting good 👍 ! Added two comments.

readme.md Show resolved Hide resolved
readme.md Show resolved Hide resolved
@dai-shi
Copy link
Member

dai-shi commented Jan 13, 2023

#1681 (comment)
Can you revert to 2fe941c ?

@AwesomeDevin
Copy link
Contributor Author

AwesomeDevin commented Jan 13, 2023

#1681 (comment) Can you revert to 2fe941c ?

Got it! like this ?

Copy link
Member

@dai-shi dai-shi left a comment

Choose a reason for hiding this comment

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

Thanks!!!

@dai-shi
Copy link
Member

dai-shi commented Jan 13, 2023

Unfortunately, we need to revert this too:
2fe941c...43a6846

@AwesomeDevin
Copy link
Contributor Author

Unfortunately, we need to revert this too: 2fe941c...43a6846

😂 I resubmitted a copy of the code,is it ok?

@dai-shi
Copy link
Member

dai-shi commented Jan 13, 2023

Should be good. Thanks!

@AwesomeDevin
Copy link
Contributor Author

Should be good. Thanks!

Thank you for your guidance ~

@dai-shi dai-shi merged commit ed866ae into pmndrs:main Jan 13, 2023
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