# Passing Data to Components
> * 如有錯誤處指正或任何建議,懇請留言,感謝!
> * 搭配 ChatGPT 進行翻譯,請小心服用
> * ▸ ... 為英文原文
:::spoiler ...
Web applications are built up from components in the same way that general applications are built up from functions.
:::
網頁應用程式是從元件建立而成,就像一般應用程式是從函式建立而成一樣。
:::spoiler ...
Composing functions would not be very useful if you couldn't pass in parameters. In the same way that functions have parameters, components have "props". A component uses props to pass data to its children components.
:::
如果你不能傳遞參數,那麼組合函式就沒有什麼用處。而就像函式有參數一樣,元件也有`props`。元件用 `props` 使用,用以將資料傳遞給它的子元件。
:::spoiler ...
Your task: Modify the code so that the parent `<App>` can pass `salutation="Hello"` and `name="World"` to the `<Greeter>`. Add properties to the `GreeterProps` interface and then add the necessary bindings.
:::
你的任務是:修改程式,讓父元件 `<App>` 可以用 `salutation="Hello"` 與 `name="World"` 的方式將其值傳遞給 `<Greeter>` 。在介面 `GreeterProps` 裡新增屬性並添加必要的綁定。
[下一步:Passing Stores](https://hackmd.io/hUDhp5BxSMKGYuf0sTnB4A)
###### tags: `Component Props`