<p dir="auto">When you are building components, you often want to support both valueLink and value/onChange, which means you need a function like this:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="getValueLink: function(props) {
  return props.valueLink || {
    value: props.value,
    requestChange: props.onChange
  };
},"><pre class="notranslate"><code class="notranslate">getValueLink: function(props) {
  return props.valueLink || {
    value: props.value,
    requestChange: props.onChange
  };
},
</code></pre></div>
<p dir="auto">This easily end up being duplicated between components. Would it be an idea to include it in the LinkedState mixin?</p>
<p dir="auto">Describe what you were doing when the bug occurred:<br>
1.<br>
2.<br>
3.</p>
<hr>
<h2 dir="auto">Please do not remove the text below this line</h2>
<p dir="auto">DevTools version: 4.2.1-3816ae7c3</p>
<p dir="auto">Call stack: at chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:157108<br>
at Map.forEach ()<br>
at commitIndex (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:157054)<br>
at e.getRankedChartData (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:157577)<br>
at vl (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:314907)<br>
at gi (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:59907)<br>
at jl (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:107381)<br>
at Lc (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:92715)<br>
at Pc (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:92640)<br>
at wc (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:89544)</p>
<p dir="auto">Component stack: in vl<br>
in div<br>
in div<br>
in div<br>
in wo<br>
in Unknown<br>
in n<br>
in Unknown<br>
in div<br>
in div<br>
in Li<br>
in $e<br>
in dn<br>
in Ca<br>
in Pc</p>