Git Product home page Git Product logo

manatea's People

Contributors

ayc0 avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

manatea's Issues

Funnier names

We should only use tea related variables

  • createCup -> placeOrder or orderCup (i prefer to keep the word Cup in it)
  • cup's listener -> customer ? or server because when your cup get's filled with tea, a server is refilling your cup
  • setter -> fixation (see https://en.wikipedia.org/wiki/Tea_processing#General "Fixation / kill-green") or flavoring
  • Change -> Stir or Refill because a server refills your cup or Order
  • initialTea -> greenTea, or firstTea or morningTea because it's the first thing one's drink when waking up (doesn't match the server analogy) firstOrder
  • newTea -> mixedTea (to go with stir) or greenTea too or refill (there is no tea in it so it's a bit hard to read) or teaRefill?

First you order a cup of tea (with orderCup) filled with your firstTea. Then you can place a new order and the server will refill your cup with a new tea.

Depending on whether or not the tea suits you, you can add flavor to it with a flavoring

What about manatees?

Selectors & combining multiple cups

Selector

Jotai

const doubledCountAtom = atom((get) => get(countAtom) * 2)

Recoil

const doubledCount = selector({
  key: '<key>',
  get: ({get}) => get(countAtom) * 2
});

Combining

Jotai

getter

const count1 = atom(1)
const count2 = atom(2)
const count3 = atom(3)

const sum = atom((get) => get(count1) + get(count2) + get(count3))

setter

const decrementCountAtom = atom(
  (get) => get(countAtom),
  (get, set, _arg) => set(countAtom, get(countAtom) - 1),
)

Recoil

Getter

const count1 = atom({
  key: 'count1',
  default: 1,
});
const count2 = atom({
  key: 'count2',
  default: 2,
});
const count3 = atom({
  key: 'count3',
  default: 3,
});

const sum = selector({
  key: '<key>',
  get: ({get}) => get(count1) + get(count2) + get(count3)
});

setter

Not possible

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.