const $userName = createStore('john')
const signIn = createEffect({handler: console.log})
const submitForm = createEvent()
const sampleUnit = sample(
$userName /* 2 */,
submitForm /* 1 */,
(name, password) => ({name, password}) /* 3 */
)
/* 5 */
forward({
from: sampleUnit,
to: signIn,
})
submitForm(12345678)
// 1. when submitForm is called with params (12345678)
// 2. take $userName store`s state ('john')
// 3. transform payload from event (1) and current store`s state (2)
// 4. when sampleUnit (event in this case) is trigered,
// send it payload to effect signIn with params received at the step (3)