refactor(app.tsx): use constants instead of hard coded strings for better readablility (#1391)

don't use inline function as it will create a new refrence everytime
This commit is contained in:
Aakansha Doshi 2020-04-12 06:12:02 +05:30 committed by GitHub
parent d902bbd618
commit e98fba38be
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 129 additions and 59 deletions

View file

@ -16,3 +16,35 @@ export const POINTER_BUTTON = {
SECONDARY: 2,
TOUCH: -1,
};
export enum SCENE {
INIT = "SCENE_INIT",
UPDATE = "SCENE_UPDATE",
}
export enum EVENT {
COPY = "copy",
PASTE = "paste",
CUT = "cut",
KEYDOWN = "keydown",
KEYUP = "keyup",
MOUSE_MOVE = "mousemove",
RESIZE = "resize",
UNLOAD = "unload",
BLUR = "blur",
DRAG_OVER = "dragover",
DROP = "drop",
GESTURE_END = "gestureend",
BEFORE_UNLOAD = "beforeunload",
GESTURE_START = "gesturestart",
GESTURE_CHANGE = "gesturechange",
POINTER_MOVE = "pointermove",
POINTER_UP = "pointerup",
WHEEL = "wheel",
TOUCH_START = "touchstart",
}
export const ENV = {
TEST: "test",
DEVELOPMENT: "development",
};