<p dir="auto">I didn't notice  any deviation from the behavior I expected from the component.</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/d1b03571a29e8be88842e2a3aff150bbcbeda3212aeeb13185df31701b572d3c/68747470733a2f2f692e6962622e636f2f53784c484734392f696d6167652d323032322d30352d30352d5430362d31322d32322d3336392d5a2e706e67"><img src="https://camo.githubusercontent.com/d1b03571a29e8be88842e2a3aff150bbcbeda3212aeeb13185df31701b572d3c/68747470733a2f2f692e6962622e636f2f53784c484734392f696d6167652d323032322d30352d30352d5430362d31322d32322d3336392d5a2e706e67" alt="Please notify react team" data-canonical-src="https://i.ibb.co/SxLHG49/image-2022-05-05-T06-12-22-369-Z.png" style="max-width: 100%;"></a></p>
<h3 dir="auto">component:</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="
export const Contract: FC&lt;ContractProps&gt; = ({
  contract = demo_contract,
  hide,
  show
}) =&gt; {
  if (!show) {
    return &lt;&gt;&lt;/&gt;
  }
  const { user } = useAppSelector(store =&gt; store.users)
  const [loan_contract, set_loan_contract] = useState(compute_whole_contract(contract, user as User));
  useEffect(() =&gt; {
    set_loan_contract(compute_whole_contract(contract, user as User))
  }, [contract])

  return (
    &lt;Modal show={show} fullscreen onHide={hide} className=&quot;addloan_contract&quot;&gt;
      &lt;Modal.Header closeButton&gt;
        &lt;Modal.Title&gt;Loan Contract&lt;/Modal.Title&gt;
      &lt;/Modal.Header&gt;
      &lt;Modal.Body className=&quot;add_loan_contract_form&quot;&gt;
        &lt;ContractContext.Provider value={{ loan_contract, set_loan_contract }}&gt;
          &lt;ContractForm /&gt;
          &lt;LoanRepaymentSchedule /&gt;
        &lt;/ContractContext.Provider&gt;
      &lt;/Modal.Body&gt;
    &lt;/Modal&gt;
  )
}"><pre class="notranslate"><code class="notranslate">
export const Contract: FC&lt;ContractProps&gt; = ({
  contract = demo_contract,
  hide,
  show
}) =&gt; {
  if (!show) {
    return &lt;&gt;&lt;/&gt;
  }
  const { user } = useAppSelector(store =&gt; store.users)
  const [loan_contract, set_loan_contract] = useState(compute_whole_contract(contract, user as User));
  useEffect(() =&gt; {
    set_loan_contract(compute_whole_contract(contract, user as User))
  }, [contract])

  return (
    &lt;Modal show={show} fullscreen onHide={hide} className="addloan_contract"&gt;
      &lt;Modal.Header closeButton&gt;
        &lt;Modal.Title&gt;Loan Contract&lt;/Modal.Title&gt;
      &lt;/Modal.Header&gt;
      &lt;Modal.Body className="add_loan_contract_form"&gt;
        &lt;ContractContext.Provider value={{ loan_contract, set_loan_contract }}&gt;
          &lt;ContractForm /&gt;
          &lt;LoanRepaymentSchedule /&gt;
        &lt;/ContractContext.Provider&gt;
      &lt;/Modal.Body&gt;
    &lt;/Modal&gt;
  )
}
</code></pre></div>
<p dir="auto">React version: V18.0.0<br>
React router DOM: V5.2.1</p>
<h2 dir="auto">Steps To Reproduce</h2>
<ol dir="auto">
<li>Going to profile page</li>
<li>Warning: Internal React error: Expected static flag was missing. Please notify the React team.</li>
</ol>

<p dir="auto">Link to code example:<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/51002164/163707500-3ee1ca51-9695-4e2e-b3c4-3f5e8f7a98b3.png"><img src="https://user-images.githubusercontent.com/51002164/163707500-3ee1ca51-9695-4e2e-b3c4-3f5e8f7a98b3.png" alt="Screenshot 2022-04-17 124859" style="max-width: 100%;"></a><br>
DynamicFilter.js component<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/51002164/163707576-b8536b98-3b47-4c7e-84f3-abfa9f93dddf.png"><img src="https://user-images.githubusercontent.com/51002164/163707576-b8536b98-3b47-4c7e-84f3-abfa9f93dddf.png" alt="Screenshot 2022-04-17 125107" style="max-width: 100%;"></a></p>

<h2 dir="auto">The current behavior</h2>
<h2 dir="auto">The expected behavior</h2>