---
order: 1
title: 固定状态改变的回调
title_en: Callback
---

可以获得是否固定的状态。
Callback with affixed state.

````jsx
import { Affix, Button } from 'antd';

ReactDOM.render(
  <Affix offsetTop={120} onChange={affixed => console.log(affixed)}>
    <Button>120px to affix top</Button>
  </Affix>,
  mountNode
);
````
