Skip to content

Commit 8290add

Browse files
committed
Add JSX interview questions
1 parent aa59ea7 commit 8290add

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,7 @@
307307
|291| [What are the problems of using render props with pure components?](#what-are-the-problems-of-using-render-props-with-pure-components)|
308308
|292| [How do you create HOC using render props?](#how-do-you-create-hoc-using-render-props)|
309309
|293| [What is windowing technique?](#what-is-windowing-technique)|
310+
|294| [How do you print falsy values in JSX?](#how-do-you-print-falsy-values-in-jsx)|
310311

311312
## Core React
312313

@@ -4918,3 +4919,10 @@
49184919
This way render props gives the flexibility of using either pattern.
49194920
293. ### What is windowing technique?
49204921
Windowing is a technique that only renders a small subset of your rows at any given time, and can dramatically reduce the time it takes to re-render the components as well as the number of DOM nodes created. If your application renders long lists of data then this technique is recommended. Both react-window and react-virtualized are popular windowing libraries which provides several reusable components for displaying lists, grids, and tabular data.
4922+
294. ### How do you print falsy values in JSX?
4923+
The falsy values such as false, null, undefined, and true are valid children but they don't render anything. If you still want to display them then you need to convert it to string. Let's take an example on how to convert to a string,
4924+
```javascript
4925+
<div>
4926+
My JavaScript variable is {String(myVariable)}.
4927+
</div>
4928+
```

0 commit comments

Comments
 (0)