Tag Archives: decide

Express Validator – Do simple if checks to decide what to validate – Node Dev Feed

Express Validator – Do simple if checks to decide what to validate TLDR: Use a custom validator and extract the core validation rules direct from validator.js I personally really dislike Express Validator, and have moved onto use alternatives like Joi and Yup. However, often you inherit code that you have to maintain. Express Validator doesnt…

Read More

Short checklist to decide when to useReducer & useState hook in the components – React Dev Feed

Short checklist to decide when to useReducer & useState hook in the components useReducer() & useState() hooks, both of them are state management hooks which add interactivity in the app & component. But sometimes, it can be complicated to distinguish which hook we should use and in which cases we should consider useReducer or useState….

Read More