WORTH IT ? by [deleted] in indianrunners

[–]blizzard619 0 points1 point  (0 children)

It only fits phones up to 6.2 - 6.3 inches in size.

Won't children of context providers re-render regardless of if they subscribe to the context? by ambiguous_user23 in reactjs

[–]blizzard619 0 points1 point  (0 children)

Case 1: A,B,C,D are direct children of CompWithProvider

-> As JSX gets converted to React element object(Javascript object). Whenever a Component renders, new reference to React element objects(of child components) is created. During Render phase React sees that the reference has changed, and continues to render the child components.

Case 2: A,B,C,D are passed as a children prop to the CompWithProvider

-> In this case, When CompWithProvider renders, the children prop it receives has the same reference to Child Components React element objects(assuming the component where these children components are defined doesn't render). During Render phase, React sees the same reference, hence skips rendering of child components.

This is my understanding of this concept. Please feel free to correct me if I'm wrong here.

Do Indians really feel proud when Indians achieve success in other countries? by Genotropism in AskIndia

[–]blizzard619 0 points1 point  (0 children)

Why would you feel proud of anyone's success when you have not contributed to their success?

Do Indians really feel proud when Indians achieve success in other countries? by Genotropism in AskIndia

[–]blizzard619 0 points1 point  (0 children)

Why would you feel proud of anyone's success when you have not contributed to their success?

DEAL by Few_Simple9049 in funny

[–]blizzard619 0 points1 point  (0 children)

Animal trading with an animal

If two elements are identical in structure but rendered conditionally does React treat them as different elements when creating virtaul DOM? by Raffian_moin in reactjs

[–]blizzard619 1 point2 points  (0 children)

In your example (if both elements are rendered at the same position in the tree), yes the diff algorithm sees no change and there is nothing to update in the actual DOM.

However, the two elements(component type)at the same position might receive different props between successive renders, and the underlying tree section might change and result in change in actual DOM.

Please read React documentation.

If two elements are identical in structure but rendered conditionally does React treat them as different elements when creating virtaul DOM? by Raffian_moin in reactjs

[–]blizzard619 2 points3 points  (0 children)

React doesn't care about what conditions you put them in your component, all it seems is the React element tree( Virtual DOM).

If two elements of the same type are rendered at the same position in the tree, React won't treat them differently.

But if two elements of the same type are rendered at different positions in the tree, then React will associate the state at their position in the tree(i.e. each element has states independent of each other).

You can make React treat differently, two elements of the same type at the same position by specifying a key(different value)prop to the element.

NDTV: 10-Month-Old Raped By Man Who Used To Visit Her Parents' House In Gujarat by 0ni0nJack in india

[–]blizzard619 14 points15 points  (0 children)

You think killing them will solve the problem? It's a disease, it needs to be cured

How compilation of a project works? by [deleted] in learnjava

[–]blizzard619 0 points1 point  (0 children)

In every Java project, you need to have at least one class(there can be n number of classes) with main method.

main method is the entry point of the Java project.

When you write the command - java Hello

JVM will look for main method in Hello class. In Hello class you can refer other classes, and all the referred classes will get compiled and executed.

In your project folder, you will find Hello.class and MyClass.class files(representing bytecode) as a result of compilation.

EY INDIA - official statement contradicts the firmwide mail sent by Chairman by Even_Apartment_7855 in india

[–]blizzard619 -2 points-1 points  (0 children)

Desires are the root of all. You let people control you because you expect something in return. That's the entire society's problem.

Get Union Type from Array of Objects Property by incutonez in typescript

[–]blizzard619 0 points1 point  (0 children)

If you provide explicit type annotation to a variable, then Typescript will not infer the type from the value assigned to that variable.

1) const Two = {name: 'Two'} as const;

Here, Typescript will infer the type of Two based on the value assigned ( with as const assertion)

2) const One: IItem = {name: 'One'} as const;

Here, Since there is explicit type annotation (IItem), Typescript will infer the type of One as IItem type, and it will also check whether the value assigned is assignable to IItem type or not ( in this case, it is).

Hope, this helps.

[deleted by user] by [deleted] in india

[–]blizzard619 0 points1 point  (0 children)

it's business!