Open switz opened 1 year ago
Very often we have multiple boolean flags to represent a component and a single finite state does not reflect the UI we want to build. How might we design a more flexible driver to handle nested finite states?
driver
const card = driver({ states: { USER: { ADMIN: isAdmin, MEMBER: isMember, LOGGEDOUT: true, }, CARD: { IS_DELETED: card.status === 'deleted', } }, });
Jotting down some notes, need to think more here.
Very often we have multiple boolean flags to represent a component and a single finite state does not reflect the UI we want to build. How might we design a more flexible
driver
to handle nested finite states?Jotting down some notes, need to think more here.