React Basic Quiz
React is a JavaScript library for building ___.
React is a free and open-source front-end JavaScript library for building user interfaces based on UI components.
User interface developed with React is made of small and isolated pieces of code called ___.
How many kinds of component's does react has?
React has two types of components Class based and functional
A React component takes in parameters called ___?
To write HTML in react we make use of ___?
JSX Stands for ___?
React DOM uses ___ case property naming convention?
___ are the smallest building blocks of React apps.
Elements are the smallest building blocks of React apps. A component is made up of multiple elements.
Can we update the React elements once they are rendered?
React elements are immutable. Once you create an element, you can’t change its children or attributes. An element is like a single frame in a movie: it represents the UI at a certain point in time.
Applications built with just React usually have a single ___?
A component names must start with a ___ letter
React treats components starting with lowercase letters as DOM tags so a component must start with a capital letter
Can we render a react component from an other component?
Components can refer to other components in their output. This lets us use the same component abstraction for any level of detail. A button, a form, a dialog, a screen: in React apps, all those are commonly expressed as components.
Can a component modify its own props?
Its a React rule that components must act like pure functions with respect to their props. A “pure” function is the one which do not attempt to change their inputs.
Which component lifecycle method runs after the component output has been rendered to the DOM.
Which component lifecycle method is used to perform the cleanup when the component in removed from the DOM
State of a component are often called ___ data?
Neither parent nor child components can know if a certain component is stateful or stateless. This is why state is often called local or encapsulated. It is not accessible to any component other than the one that owns and sets it.
In react data flows in ___?
Any state is always owned by some specific component, and any data or UI derived from that state can only affect components “below” them in the tree.
In order to prevent component from rendering it should return ___?
In rare cases you might want a component to hide itself even though it was rendered by another component. To do this return null instead of its render output.
In order to prevent component from rendering it should return ___?
In rare cases you might want a component to hide itself even though it was rendered by another component. To do this return null instead of its render output.
If a component returns null then it's lifecycle methods are not fired?
Returning null from a component’s render method does not affect the firing of the component’s lifecycle methods. For instance componentDidUpdate will still be called.