JUJoshua Uchenna Amajuinjoshuaamaju.hashnode.dev·Sep 27, 2022 · 3 min readSchrodinger's functionPromises and throw considered harmful Take for example the code below function createUser(email: string): User { if (users.includes(email)) { throw new Error(`User with email ${email} already exists`) } ... return newUser; ...00
JUJoshua Uchenna Amajuinjoshuaamaju.hashnode.dev·Sep 25, 2021 · 1 min readEmpty state viewI need to display an empty state when my list is empty. That should be easy, how do you plan on achieving that? Thought about several methods: Class toggling <div> <ul className={list.length > 0 ? 'show' : 'hide'}>...</ul> <div className={li...00