Skip to content

Commit 4dc2dc6

Browse files
committed
Add function interview questions
1 parent 2b877b4 commit 4dc2dc6

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,8 @@
271271
|255| [How to debug forwardRefs in DevTools?](#how-to-debug-forwardrefs-in-devtools)|
272272
|256| [When component props defaults to true?](#when-component-props-defaults-to-true)|
273273
|257| [What is NextJS and major features of it?](#what-is-nextjs-and-major-features-of-it)|
274+
|258| [How do you pass an event handler to a component?](#how-do-you-pass-an-event-handler-to-a-component)|
275+
|259| [Is it good to use arrow functions in render methods?](#is-it-good-to-use-arrow-functions-in-render-methods)|
274276

275277
## Core React
276278

@@ -4317,3 +4319,10 @@
43174319
4. Webpack-based dev environment which supports (HMR)
43184320
5. Able to implement with Express or any other Node.js HTTP server
43194321
6. Customizable with your own Babel and Webpack configurations
4322+
258. ### How do you pass an event handler to a component?
4323+
You can pass event handlers and other functions as props to child components. It can be used in child component as below,
4324+
```
4325+
<button onClick={this.handleClick}>
4326+
```
4327+
259. ### Is it good to use arrow functions in render methods?
4328+
Yes, You can use. It is often the easiest way to pass parameters to callback functions. But you need to optimize the performance for any issues.

0 commit comments

Comments
 (0)