mirror of
https://github.com/ascribe/onion.git
synced 2025-01-03 18:35:09 +01:00
11 lines
204 B
JavaScript
11 lines
204 B
JavaScript
'use strict'
|
|
|
|
export function onChangeOnce(component, store) {
|
|
const onChange = (state) => {
|
|
component.setState(state);
|
|
store.unlisten(onChange);
|
|
};
|
|
|
|
store.listen(onChange);
|
|
}
|