Engineering Blog

                            

react

Using index as a key in React (anti-pattern)

What are lists in React ? Lists are used to display data which are similar in ordered format . Often they have same type i.e an array of similar kind of data rendered into a list tag using some version of for loop. How does react render lists? DOM Before we learn how react renders lists…

Common Anti-patterns with React

Common Anti-patterns with React

Nested components When a component is defined inside another component, it creates a tight coupling between the two components, meaning that they are highly dependent on one another. This can make it difficult to reuse or re purpose the inner component. Also when the parent component re-renders , the inner component will be defined again…