react-error-boundary
naming-cheatsheet
react-error-boundary | naming-cheatsheet | |
---|---|---|
14 | 24 | |
6,445 | 13,644 | |
- | - | |
6.8 | 0.6 | |
2 months ago | about 2 months ago | |
TypeScript | ||
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
react-error-boundary
-
Class vs functional components
I use the use-error-boundary module for this just to never have to write a class component myself!
-
You're in an interview for a react position and they ask you "which is better, functional or class based components" how would you answer?
Requires a dependency but you can absolutely use error boundaries with functional components via react-error-boundary: https://github.com/bvaughn/react-error-boundary
-
Is defining a function call inside a useEffect a good practice ?
as for checking errors: https://github.com/bvaughn/react-error-boundary
-
How to handle errors in React: full guide
For those of you, who hate re-inventing the wheel or just prefer libraries for already solved problems, there is a nice one that implements a flexible ErrorBoundary component and has a few useful utils similar to those described above: GitHub - bvaughn/react-error-boundary
-
I have an app written in old redux with React classes and try to migrate it to the latest version with hooks. What would you recommend to read/watch?
Use https://github.com/bvaughn/react-error-boundary for error boundaries and you won't have to write one yourself.
-
best way to convince OOPers to give functions a go?
There's no reason to manually write an error boundary as a class component yourself, either, given that https://github.com/bvaughn/react-error-boundary exists.
-
Should we use Functional or Class based Components?
Yeah, and even in that case, you should probably be using https://github.com/bvaughn/react-error-boundary rather than writing your own from scratch.
-
Should I still use class based components?
they can https://github.com/bvaughn/react-error-boundary (this is from the react team) doesn't matter how it works internally, im not going to write a class just for error handling.
- "bulletproof-react" is a hidden treasure of React best practices!
-
Derived State?
i would not bother with classes tbh, use this: https://github.com/bvaughn/react-error-boundary it's made by a react core team member and they even recommend it.
naming-cheatsheet
-
My team lead always fails my code
This guide is my go-to recommendation for freshers for "naming things": https://github.com/kettanaito/naming-cheatsheet
- Clean code (la juniori)
-
Some scripts work weirdly
Use better naming. What's variablename? var iab; len(name)? What does reader do? Read a book? https://github.com/kettanaito/naming-cheatsheet
-
Help with this password generator
Not an answer, but https://github.com/kettanaito/naming-cheatsheet
-
Variable inside a function with the same name?
But why would you need variable inside a function with the same name? https://github.com/kettanaito/naming-cheatsheet
-
Live coding preparation tips
Use the programming language you're most comfortable with if requirements are not strictly coupled to one programming language. Share your thoughts while you're coding so the interviewers can feel your way of thinking and problem-solving. Also, ask questions when something needs to be clarified for you. Try not to write pieces of code you don't fully understand, for example, using IIFE and not knowing how to pass an argument into it, using ; in front of it, and not knowing why it's used. Try to write readable code with understandable variable and function names. Avoid writing too nested statements, so it's not easy to understand the code's flow. Try to write code that is easy to cover with the tests.
- What are some things you look for during a code review?
-
Great resources for learning React and Typescript
Naming Convention Cheatsheet
-
How to cope with varying writing styles in code docs and logging messages?
Enforce style with a linter. In the js world there is also prettier. Agree upon a naming style for instance this naming cheatsheet although that is harder to enforce
-
What does it take to be a good programmer?
What a great answer :)
Regarding naming things, this comes to my mind: https://github.com/kettanaito/naming-cheatsheet
What are some alternatives?
react-hook-form - 📋 React Hooks for form state management and validation (Web + React Native)
visx - 🐯 visx | visualization components
Sentry - Developer-first error tracking and performance monitoring
naming-convention - Templates for naming convention - TSQL, JavaScript, C#, R, Python, Powershell
react-router - Declarative routing for React
Front-End-Checklist - 🗂 The perfect Front-End Checklist for modern websites and meticulous developers
redux-essentials-example-app - Example app for the Redux Essentials tutorial
modern-php-cheatsheet - Cheatsheet for some PHP knowledge you will frequently encounter in modern projects.
scaffdog - :dog: scaffdog is Markdown driven scaffolding tool.
markdown-wikitext - A cheatsheet mirroring Markdown and Wikitext
usehooks - Easy to understand React Hook code recipes