ayc0 / manatea Goto Github PK
View Code? Open in Web Editor NEWPredictable micro state manager.
Home Page: https://codesandbox.io/s/manatea-lh694
License: MIT License
Predictable micro state manager.
Home Page: https://codesandbox.io/s/manatea-lh694
License: MIT License
We should only use tea related variables
createCup
-> placeOrder
orderCup
(i prefer to keep the word Cup in it)listener
-> customer
server
because when your cup get's filled with tea, a server is refilling your cupsetter
-> fixation
(see https://en.wikipedia.org/wiki/Tea_processing#General "Fixation / kill-green")flavoring
Change
-> Stir
Refill
because a server refills your cupOrder
initialTea
-> greenTea
firstTea
or morningTea
because it's the first thing one's drink when waking upserver
analogy) firstOrdernewTea
-> mixedTea
(to go with stir)greenTea
toorefill
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?
const doubledCountAtom = atom((get) => get(countAtom) * 2)
const doubledCount = selector({
key: '<key>',
get: ({get}) => get(countAtom) * 2
});
const count1 = atom(1)
const count2 = atom(2)
const count3 = atom(3)
const sum = atom((get) => get(count1) + get(count2) + get(count3))
const decrementCountAtom = atom(
(get) => get(countAtom),
(get, set, _arg) => set(countAtom, get(countAtom) - 1),
)
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)
});
Not possible
Functions shouldn't be accepted in Tea
, but I cannot fix it.
Check out TypeScript Play to try it out
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.