<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Type &#x27;X&#x27; is not assignable to type &#x27;Y&#x27;]]></title><description><![CDATA[<pre><code class="language-ts">const [count, setCount] = useState&lt;string&gt;("0"); // Ошибка при попытке передать число
</code></pre>
<p dir="auto"><strong>Причина</strong>: Несоответствие типов данных.</p>
<p dir="auto"><strong>Решение</strong>: Указать правильный дженерик для useState:</p>
<pre><code class="language-ts">const [count, setCount] = useState&lt;number&gt;(0);
</code></pre>
]]></description><link>https://forum.exlends.ru/topic/80/type-x-is-not-assignable-to-type-y</link><generator>RSS for Node</generator><lastBuildDate>Fri, 26 Jun 2026 21:36:41 GMT</lastBuildDate><atom:link href="https://forum.exlends.ru/topic/80.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 03 Feb 2025 07:57:35 GMT</pubDate><ttl>60</ttl></channel></rss>