---
# System prepended metadata

title: normal function to arrow function

---

# normal function to arrow function
jab ek adami ek kaam kar raha hai tab button per normal event aa jayega.
example--:
<button onClick={this.changeValue}>Add user</button>

or jab ek button bhut sare logo ke liye kaam kar raha hai tab button per arrow function aayega.
example:--
<button onClick={() => this.deleteuser(userIndex)}>
Delete user</button>


```javascript=
function worker() {
  return 'worker';
}

// 1. step

const worker = () => {
  return 'worker';
}

// 2. step

const worker = () => 'worker'
//return give in the same line


// react
function App() {
  return (
    <div>
    
    </div>
  );
}

//. 1. step
const App = () => {
  return (
    <div>
    </div>
  );
}

// 2. step
const App = () => (//its mean give return
  <div>
  </div>
);

// or
const App = () => <div></div>;
//give the return in same line
//when one line then use this method 
```