Is there a way to reset the state of custom components? any workaround

I am using custom component button and I set the key=“somekey”. in native streamlit button the state reset after button press and rerun of page. however when using custom component the key value remain same and when page reruns it goes into infinite loop as if button_value will always remain true. I am using this component New Component: Streamlit-antd-components,more widgets to extend streamlit!