Skip to content

Yap review #8

@sduduzog

Description

@sduduzog
  1. This component is a good canditate to try out the ts-pattern package for states

    if (status == "loading") {

  2. Add prettier or biome to help you with format consistency, I see some of these are single quotes and some are double quotes

  3. For writing test descriptions, I personally look at it as the "should" between it and what goes in (...) is silent i.e. the statement "getSessionToken should return a valid token" in test form could be written as describe("getSessionToken") next line will be it("return a valid token") so between the describe and it, there's a silent 'should' which somewhat makes the test read better

    it("valid session", () => {

  4. ofetch from unjs.io is much much better than the polyfilled fetch out there. Just sayin

    const getTokenResponse = await fetch(URLS.Token, {

  5. just

  6. Why do react people do this? This component has a single node already, what's the point of the empty tags?

  7. I got to use it a bit, it's pretty neat. It took a while to figure out how to get started but that's a story for another day

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions