The goal of this project is to enhance redux-saga
core with opinionated ways
to use the library.
- helpers for making http requests (e.g.
fetch
effect) - helpers for setting up
redux-saga
- better types with yield delegate
/** | |
* Features: | |
* - End-user has more granular control over what events to listen to -- if any | |
* - Responding to events happens within a while-loop | |
* - End-users are free to mutate variables all they want, they just need to ensure things get re-rendered properly | |
* - All events like prop, state changes, click/event handlers are all handled the same | |
* - `watch` will await for any events coming out of those `Stream` | |
* It also automatically watches for prop changes | |
* | |
* TODO: |
/* | |
* This is an experimental view library that would compete with react, svelte, qwik.js, vue.js etc. | |
* | |
* Implementation reference: https://git.sr.ht/~erock/alpfx | |
* | |
* Features: | |
* - Instead of `view = func(state)` we have `view = func(event)` | |
* - This paradigm shift will: | |
* - make prop mgmt (e.g. when to update component) more manual | |
* - animations easier (events or transitions are sent to the component that the end-user |
const ee = emitter(); | |
ee.on(function* clicker() { | |
while (true) { | |
const event = yield take('click'); | |
console.log('click event!', event); | |
} | |
}); | |
ee.on(function* once() { | |
const event = yield take('click'); | |
console.log('on listen for event once!', event); |
import Phaser from 'phaser'; | |
class MainScene extends Phaser.Scene { | |
_player: Phaser.GameObjects.Sprite | null; | |
_cursors: Phaser.Types.Input.Keyboard.CursorKeys | null; | |
_layer: Phaser.Tilemaps.StaticTilemapLayer | null; | |
constructor() { | |
super({ | |
key: 'MainScene', |
import createTable from './slice-map'; | |
import createIndexMany from './create-index'; | |
import createPrimitive from './slice-assign'; | |
import createLoaderTable from './slice-loading-map'; | |
const createIndex = (p: any) => createTable<{ [key: string]: string }>(p); | |
interface User { | |
id: string; | |
email: string; |
const RESULT = "RESULT"; | |
const isResult = obj => obj && obj.type === RESULT; | |
const Result = value => ({ | |
type: RESULT, | |
value | |
}); | |
const NOTHING = "NOTHING"; | |
const isNothing = obj => obj && obj.type === NOTHING; | |
const Nothing = value => ({ |
import * as React from 'react'; | |
import axios from 'axios'; | |
import { connect } from 'react-redux'; | |
import { getFormSubmitErrors } from 'redux-form'; | |
+ import { push } from 'react-router-redux'; | |
import { globals, GridContainer } from '@shared/atoms'; | |
import styled from '@shared/ui'; | |
import { buildFormData } from '@shared/lib/formatters'; |
I hereby claim:
To claim this, I am signing this object:
const handler = { | |
get(target, name) { | |
return name; | |
}, | |
}; | |
const actionTypeCreator = new Proxy({}, handler); | |
const { ADD_SOMETHING, REMOVE_SOMETHING } = actionTypeCreator; |