mirror of
https://github.com/ascribe/onion.git
synced 2025-01-07 04:04:20 +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);
|
||
|
}
|