---
tags:
  - typescript
  - react
---
# Functions
Continuing from the other examples of React Typescript, we could do standard
listing function, like:
```tsx
  {people.map((person) => {
    return - {person.name}
 ;
  })}
```
But it's neater to do it with a function defined within the `List` component:
```tsx
const renderList = (): JSX.Element[] => {
  return people.map((person) => {
    return (
      
        {person.name}
        {person.age}
      
    );
  });
};
```
And then change the eariler list to a function invocation:
```tsx