<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Techy Things &#187; reactjs</title>
	<atom:link href="https://tech.yipp.ca/category/reactjs/feed/" rel="self" type="application/rss+xml" />
	<link>https://tech.yipp.ca</link>
	<description>Just another Yipp.ca Blogs site</description>
	<lastBuildDate>Thu, 01 May 2025 18:06:28 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.2.38</generator>
	<item>
		<title>TS2322: Type &#039;{ wait: false; }&#039; is not assignable to type &#039;ReactOptions&#039;.</title>
		<link>https://tech.yipp.ca/reactjs/ts2322-type-wait-false-assignable-type-reactoptions/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=ts2322-type-wait-false-assignable-type-reactoptions</link>
		<comments>https://tech.yipp.ca/reactjs/ts2322-type-wait-false-assignable-type-reactoptions/#comments</comments>
		<pubDate>Thu, 06 Feb 2025 22:45:32 +0000</pubDate>
		<dc:creator><![CDATA[frank]]></dc:creator>
				<category><![CDATA[reactjs]]></category>

		<guid isPermaLink="false">http://tech.yipp.ca/?p=4513</guid>
		<description><![CDATA[<p>&#160; This can happen when upgrading i18next from version "19.9.2" to  "22.5.1". The wait option that got removed was : export interface ReactOptions { /** * Set to true if you like to wait for loaded in&#46;&#46;&#46;</p>
<p>The post <a rel="nofollow" href="https://tech.yipp.ca/reactjs/ts2322-type-wait-false-assignable-type-reactoptions/">TS2322: Type '{ wait: false; }' is not assignable to type 'ReactOptions'.</a> appeared first on <a rel="nofollow" href="https://tech.yipp.ca">Techy Things</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p><a href="http://tech.yipp.ca/files/2025/02/i18n-react-wait-false.png"><img class="alignnone size-full wp-image-4514" src="http://tech.yipp.ca/files/2025/02/i18n-react-wait-false.png" alt="i18n react wait false" width="1045" height="472" /></a></p>
<p>&nbsp;</p>
<p>This can happen when upgrading <a href="https://www.npmjs.com/package/i18next" target="_blank">i18next </a>from version "19.9.2" to  "22.5.1".</p>
<p>The wait option that got removed was :</p>
<pre>export interface ReactOptions {
  /**
   * Set to true if you like to wait for loaded in every translated hoc
   * @default false
   */
<strong>  wait?: boolean;

</strong></pre>
<div>It was removed in this commit with no useful commit message:</div>
<div><a href="http://tech.yipp.ca/files/2025/02/i18next-removal-of-wait-option.png"><img class="alignnone size-full wp-image-4519" src="http://tech.yipp.ca/files/2025/02/i18next-removal-of-wait-option.png" alt="i18next removal of wait option" width="1009" height="754" /></a></div>
<div></div>
<div>In 118next-react we can see it was replaced by useSuspense :</div>
<div><a href="http://tech.yipp.ca/files/2025/02/i18n-react-wait-deprecated-useSuspense.png"><img class="alignnone size-full wp-image-4516" src="http://tech.yipp.ca/files/2025/02/i18n-react-wait-deprecated-useSuspense.png" alt="i18n-react wait deprecated useSuspense" width="1396" height="688" /></a></div>
<div></div>
<p>And what is useSuspense used for ? Let's check the documentation</p>
<p><a href="http://tech.yipp.ca/files/2025/02/useSuspence.png"><img class="alignnone size-full wp-image-4518" src="http://tech.yipp.ca/files/2025/02/useSuspence.png" alt="useSuspence" width="687" height="145" /></a></p>
<p>&nbsp;</p>
<p>Wow very useful, thank you !</p>
<p>Actually Suspense is a React feature. It was first added for server-side lazy rendering but is also available on client-side frontends. It's used for lazy loading components. If you don't know what it is you are probably not using it. Then the default is fine since this parameter might not even affect your project.</p>
<p>As a side note in plugin options declaration that have default values, it's best not to declare option's parameters to the default value for two reasons:</p>
<ol>
<li>It's more readable if the default options are not included. Your config then lists only non-default values and you can grasp more easily how the config differs from other peoples project. In general default values are chosen carefully and should be changed only when having a good reason to.</li>
<li>It's more maintainable. When the option is removed by the plugin/module maintainer and replaced or renamed, your config adapts automatically. This case is an example. If the coder had not written the useless `wait: false` which is anyway the default value, it would not have broke during upgrade.</li>
</ol>
<p>&nbsp;</p>
<p>The post <a rel="nofollow" href="https://tech.yipp.ca/reactjs/ts2322-type-wait-false-assignable-type-reactoptions/">TS2322: Type '{ wait: false; }' is not assignable to type 'ReactOptions'.</a> appeared first on <a rel="nofollow" href="https://tech.yipp.ca">Techy Things</a>.</p>
]]></content:encoded>
			<wfw:commentRss>https://tech.yipp.ca/reactjs/ts2322-type-wait-false-assignable-type-reactoptions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>You must provide the URL of lib/mappings.wasm by calling SourceMapConsumer.initialize ERROR #98123 WEBPACK</title>
		<link>https://tech.yipp.ca/reactjs/you-must-provide-the-url-of-libmappings-wasm-by-calling-sourcemapconsumer-initialize/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=you-must-provide-the-url-of-libmappings-wasm-by-calling-sourcemapconsumer-initialize</link>
		<comments>https://tech.yipp.ca/reactjs/you-must-provide-the-url-of-libmappings-wasm-by-calling-sourcemapconsumer-initialize/#comments</comments>
		<pubDate>Fri, 13 Sep 2024 19:33:49 +0000</pubDate>
		<dc:creator><![CDATA[frank]]></dc:creator>
				<category><![CDATA[reactjs]]></category>

		<guid isPermaLink="false">http://tech.yipp.ca/?p=4490</guid>
		<description><![CDATA[<p>ERROR #98123 WEBPACK Generating development JavaScript bundle failed You must provide the URL of lib/mappings.wasm by calling SourceMapConsumer.initialize({ 'lib/mappings.wasm': ... }) before using SourceMapConsumer File: .cache\app.js Solution Add --no-experimental-fetch like such   You can&#46;&#46;&#46;</p>
<p>The post <a rel="nofollow" href="https://tech.yipp.ca/reactjs/you-must-provide-the-url-of-libmappings-wasm-by-calling-sourcemapconsumer-initialize/">You must provide the URL of lib/mappings.wasm by calling SourceMapConsumer.initialize ERROR #98123 WEBPACK</a> appeared first on <a rel="nofollow" href="https://tech.yipp.ca">Techy Things</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>ERROR #98123 WEBPACK</p>
<p>Generating development JavaScript bundle failed</p>
<p>You must provide the URL of lib/mappings.wasm by calling SourceMapConsumer.initialize({ 'lib/mappings.wasm': ... })<br />
before using SourceMapConsumer</p>
<p>File: .cache\app.js</p>
<p><a href="http://tech.yipp.ca/files/2024/09/source-fetch-error-Screenshot-2024-09-13-151340.png"><img class="alignnone size-full wp-image-4492" src="http://tech.yipp.ca/files/2024/09/source-fetch-error-Screenshot-2024-09-13-151340.png" alt="source fetch error Screenshot 2024-09-13 151340" width="1345" height="369" /></a></p>
<h3>Solution</h3>
<p>Add</p>
<pre>--no-experimental-fetch</pre>
<p>like such</p>
<div> <a href="http://tech.yipp.ca/files/2024/09/source-fetch-solution-Screenshot-2024-09-13-151340.png"><img class="alignnone size-full wp-image-4493" src="http://tech.yipp.ca/files/2024/09/source-fetch-solution-Screenshot-2024-09-13-151340.png" alt="source fetch solution Screenshot 2024-09-13 151340" width="949" height="288" /></a></div>
<p>You can try to add it in package.json but this may fail sometimes if your command expect optional arguments. The full proof way is to add it to .env in the directory as package.json to add it as an environment variable like above.</p>
<p>The post <a rel="nofollow" href="https://tech.yipp.ca/reactjs/you-must-provide-the-url-of-libmappings-wasm-by-calling-sourcemapconsumer-initialize/">You must provide the URL of lib/mappings.wasm by calling SourceMapConsumer.initialize ERROR #98123 WEBPACK</a> appeared first on <a rel="nofollow" href="https://tech.yipp.ca">Techy Things</a>.</p>
]]></content:encoded>
			<wfw:commentRss>https://tech.yipp.ca/reactjs/you-must-provide-the-url-of-libmappings-wasm-by-calling-sourcemapconsumer-initialize/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>TS2786: &#039;VictoryAxis&#039; cannot be used as a JSX component</title>
		<link>https://tech.yipp.ca/reactjs/ts2786-victoryaxis-used-jsx-component/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=ts2786-victoryaxis-used-jsx-component</link>
		<comments>https://tech.yipp.ca/reactjs/ts2786-victoryaxis-used-jsx-component/#comments</comments>
		<pubDate>Fri, 05 Jul 2024 23:09:51 +0000</pubDate>
		<dc:creator><![CDATA[frank]]></dc:creator>
				<category><![CDATA[reactjs]]></category>

		<guid isPermaLink="false">http://tech.yipp.ca/?p=4463</guid>
		<description><![CDATA[<p>TS2786: 'VictoryAxis' cannot be used as a JSX component Current versions used, along with node v18. "@types/react-dom": "^18.2.7",   "@types/react": "18.0.2", This can occur when switching from node 16 or lower to node 18&#46;&#46;&#46;</p>
<p>The post <a rel="nofollow" href="https://tech.yipp.ca/reactjs/ts2786-victoryaxis-used-jsx-component/">TS2786: 'VictoryAxis' cannot be used as a JSX component</a> appeared first on <a rel="nofollow" href="https://tech.yipp.ca">Techy Things</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>TS2786: 'VictoryAxis' cannot be used as a JSX component</p>
<p>Current versions used, along with node v18.</p>
<div>
<pre>  "@types/react-dom": "^18.2.7",
  "@types/react": "18.0.2",</pre>
</div>
<p>This can occur when switching from node 16 or lower to node 18 or more.</p>
<p>This is similar to this unanswered question https://github.com/FormidableLabs/victory/discussions/2632</p>
<h3>Solution #1</h3>
<p>&nbsp;</p>
<h3>Solution #2</h3>
<pre>npm install --save-dev @types/react@latest
npm install --save-dev @types/react-dom@latest

or</pre>
<pre>yarn add --dev @types/react@latest
yarn add --dev @types/react-dom@latest</pre>
<p>&nbsp;</p>
<p>The post <a rel="nofollow" href="https://tech.yipp.ca/reactjs/ts2786-victoryaxis-used-jsx-component/">TS2786: 'VictoryAxis' cannot be used as a JSX component</a> appeared first on <a rel="nofollow" href="https://tech.yipp.ca">Techy Things</a>.</p>
]]></content:encoded>
			<wfw:commentRss>https://tech.yipp.ca/reactjs/ts2786-victoryaxis-used-jsx-component/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TFunction TS2345: Argument of type &#039;xyz&#039; is not assignable to parameter of type</title>
		<link>https://tech.yipp.ca/reactjs/ts2345-argument-type-xyz-assignable-parameter-type/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=ts2345-argument-type-xyz-assignable-parameter-type</link>
		<comments>https://tech.yipp.ca/reactjs/ts2345-argument-type-xyz-assignable-parameter-type/#comments</comments>
		<pubDate>Sun, 05 May 2024 17:44:21 +0000</pubDate>
		<dc:creator><![CDATA[frank]]></dc:creator>
				<category><![CDATA[reactjs]]></category>

		<guid isPermaLink="false">http://tech.yipp.ca/?p=4444</guid>
		<description><![CDATA[<p>Property '$TFunctionBrand' is missing in type ... ERROR in src/pages/todos/todos.tsx:27:16 TS2345: Argument of type 'import("C:/dev/react-scss-jest-typescript/node_modules/react-i18next/ts4.1/index").TFunction&#60;"translation", undefined&#62;' is not assignable to parameter of type 'import("C:/dev/react-scss-jest-typescript/node_modules/i18next/typescript/t.v4").TFunction&#60;"translation", undefined&#62;'. Property '$TFunctionBrand' is missing in type 'import("C:/dev/react-scss-jest-typescript/node_modules/react-i18next/ts4.1/index").TFunction&#60;"translation", undefined&#62;' but&#46;&#46;&#46;</p>
<p>The post <a rel="nofollow" href="https://tech.yipp.ca/reactjs/ts2345-argument-type-xyz-assignable-parameter-type/">TFunction TS2345: Argument of type 'xyz' is not assignable to parameter of type</a> appeared first on <a rel="nofollow" href="https://tech.yipp.ca">Techy Things</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p><span style="color: #ff0000;"><strong>Property '$TFunctionBrand' is missing in type ...</strong></span></p>
<p>ERROR in src/pages/todos/todos.tsx:27:16<br />
TS2345: Argument of type 'import("C:/dev/react-scss-jest-typescript/node_modules/react-i18next/ts4.1/index").TFunction&lt;"translation", undefined&gt;' is not assignable to parameter of type 'import("C:/dev/react-scss-jest-typescript/node_modules/i18next/typescript/t.v4").TFunction&lt;"translation", undefined&gt;'.<br />
Property '$TFunctionBrand' is missing in type 'import("C:/dev/react-scss-jest-typescript/node_modules/react-i18next/ts4.1/index").TFunction&lt;"translation", undefined&gt;' but required in type 'import("C:/dev/react-scss-jest-typescript/node_modules/i18next/typescript/t.v4").TFunction&lt;"translation", undefined&gt;'.<br />
25 |<br />
26 | useEffect(() =&gt; {<br />
&gt; 27 | fetchTodos(t).then((res) =&gt; {<br />
| ^</p>
<p>package.json:</p>
<div>
<pre>    "react-i18next": "^11.8.12",
    "i18next": "^23.10.1",
    "i18next-browser-languagedetector": "^6.1.0",
    "i18next-intervalplural-postprocessor": "^3.0.0",</pre>
</div>
<h3>Solution</h3>
<pre>    "react-i18next": "^14.1.1",
    "i18next": "^23.10.1",
    "i18next-browser-languagedetector": "^6.1.0",
    "i18next-intervalplural-postprocessor": "^3.0.0",</pre>
<div> Note that with dependencies it also updated babel-core from to .</div>
<div></div>
<p>The post <a rel="nofollow" href="https://tech.yipp.ca/reactjs/ts2345-argument-type-xyz-assignable-parameter-type/">TFunction TS2345: Argument of type 'xyz' is not assignable to parameter of type</a> appeared first on <a rel="nofollow" href="https://tech.yipp.ca">Techy Things</a>.</p>
]]></content:encoded>
			<wfw:commentRss>https://tech.yipp.ca/reactjs/ts2345-argument-type-xyz-assignable-parameter-type/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Error: Can&#039;t resolve &#039;http&#039; in ...\node_modules\https-browserify</title>
		<link>https://tech.yipp.ca/reactjs/error-cant-resolve-http-node_moduleshttps-browserify/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=error-cant-resolve-http-node_moduleshttps-browserify</link>
		<comments>https://tech.yipp.ca/reactjs/error-cant-resolve-http-node_moduleshttps-browserify/#comments</comments>
		<pubDate>Sat, 13 Apr 2024 23:24:15 +0000</pubDate>
		<dc:creator><![CDATA[frank]]></dc:creator>
				<category><![CDATA[reactjs]]></category>

		<guid isPermaLink="false">http://tech.yipp.ca/?p=4431</guid>
		<description><![CDATA[<p>ERROR in ./node_modules/https-browserify/index.js 1:11-26 Module not found: Error: Can't resolve 'http' in 'C:\dev\react-scss-jest-typescript\node_modules\https-browserify' BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default. This is no longer the case.&#46;&#46;&#46;
</p>
<p>The post <a rel="nofollow" href="https://tech.yipp.ca/reactjs/error-cant-resolve-http-node_moduleshttps-browserify/">Error: Can't resolve 'http' in ...\node_modules\https-browserify</a> appeared first on <a rel="nofollow" href="https://tech.yipp.ca">Techy Things</a>.</p>
]]></description>
				<content:encoded><![CDATA[<div data-can-open="true"></div>
<div data-can-open="true"><a href="http://tech.yipp.ca/files/2024/04/browserify-http.png"><img class="alignnone size-full wp-image-4433" src="http://tech.yipp.ca/files/2024/04/browserify-http.png" alt="browserify http" width="1147" height="488" /></a></div>
<div data-can-open="true"></div>
<pre>ERROR in ./node_modules/https-browserify/index.js 1:11-26
Module not found: Error: Can't resolve 'http' in 'C:\dev\react-scss-jest-typescript\node_modules\https-browserify'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
	- add a fallback 'resolve.fallback: { "http": require.resolve("stream-http") }'
	- install 'stream-http'
If you don't want to include a polyfill, you can use an empty module like this:
	resolve.fallback: { "http": false }</pre>
<div>
Sure! But add where ?!?</div>
<p>The post <a rel="nofollow" href="https://tech.yipp.ca/reactjs/error-cant-resolve-http-node_moduleshttps-browserify/">Error: Can't resolve 'http' in ...\node_modules\https-browserify</a> appeared first on <a rel="nofollow" href="https://tech.yipp.ca">Techy Things</a>.</p>
]]></content:encoded>
			<wfw:commentRss>https://tech.yipp.ca/reactjs/error-cant-resolve-http-node_moduleshttps-browserify/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>code: &#039;ERR_OSSL_EVP_UNSUPPORTED&#039; error:0308010C:digital envelope routines::unsupported</title>
		<link>https://tech.yipp.ca/reactjs/code-err_ossl_evp_unsupported-error0308010cdigital-envelope-routinesunsupported/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=code-err_ossl_evp_unsupported-error0308010cdigital-envelope-routinesunsupported</link>
		<comments>https://tech.yipp.ca/reactjs/code-err_ossl_evp_unsupported-error0308010cdigital-envelope-routinesunsupported/#comments</comments>
		<pubDate>Fri, 29 Mar 2024 03:02:47 +0000</pubDate>
		<dc:creator><![CDATA[frank]]></dc:creator>
				<category><![CDATA[reactjs]]></category>

		<guid isPermaLink="false">http://tech.yipp.ca/?p=4425</guid>
		<description><![CDATA[<p>Starting the development server... C:\dev\react-scss-jest-typescript\node_modules\react-scripts\scripts\start.js:19 throw err; ^ Error: error:0308010C:digital envelope routines::unsupported at new Hash (node:internal/crypto/hash:69:19) at Object.createHash (node:crypto:133:10) at module.exports (C:\dev\react-scss-jest-typescript\node_modules\webpack\lib\util\createHash.js:135:53) at NormalModule._initBuildHash (C:\dev\react-scss-jest-typescript\node_modules\webpack\lib\NormalModule.js:417:16) at C:\dev\react-scss-jest-typescript\node_modules\webpack\lib\NormalModule.js:452:10 at C:\dev\react-scss-jest-typescript\node_modules\webpack\lib\NormalModule.js:323:13 at C:\dev\react-scss-jest-typescript\node_modules\loader-runner\lib\LoaderRunner.js:367:11 at C:\dev\react-scss-jest-typescript\node_modules\loader-runner\lib\LoaderRunner.js:233:18 at&#46;&#46;&#46;</p>
<p>The post <a rel="nofollow" href="https://tech.yipp.ca/reactjs/code-err_ossl_evp_unsupported-error0308010cdigital-envelope-routinesunsupported/">code: 'ERR_OSSL_EVP_UNSUPPORTED' error:0308010C:digital envelope routines::unsupported</a> appeared first on <a rel="nofollow" href="https://tech.yipp.ca">Techy Things</a>.</p>
]]></description>
				<content:encoded><![CDATA[<pre>Starting the development server...

C:\dev\react-scss-jest-typescript\node_modules\react-scripts\scripts\start.js:19
 throw err;
 ^

Error: error:0308010C:digital envelope routines::unsupported
 at new Hash (node:internal/crypto/hash:69:19)
 at Object.createHash (node:crypto:133:10)
 at module.exports (C:\dev\react-scss-jest-typescript\node_modules\webpack\lib\util\createHash.js:135:53)
 at NormalModule._initBuildHash (C:\dev\react-scss-jest-typescript\node_modules\webpack\lib\NormalModule.js:417:16)
 at C:\dev\react-scss-jest-typescript\node_modules\webpack\lib\NormalModule.js:452:10
 at C:\dev\react-scss-jest-typescript\node_modules\webpack\lib\NormalModule.js:323:13
 at C:\dev\react-scss-jest-typescript\node_modules\loader-runner\lib\LoaderRunner.js:367:11
 at C:\dev\react-scss-jest-typescript\node_modules\loader-runner\lib\LoaderRunner.js:233:18
 at context.callback (C:\dev\react-scss-jest-typescript\node_modules\loader-runner\lib\LoaderRunner.js:111:13)
 at C:\dev\react-scss-jest-typescript\node_modules\react-scripts\node_modules\babel-loader\lib\index.js:59:103 {
 opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
 library: 'digital envelope routines',
 reason: 'unsupported',
 code: 'ERR_OSSL_EVP_UNSUPPORTED'
}
</pre>
<h3>Solution</h3>
<p>Upgrade from Node 16 to Node 18</p>
<p>The post <a rel="nofollow" href="https://tech.yipp.ca/reactjs/code-err_ossl_evp_unsupported-error0308010cdigital-envelope-routinesunsupported/">code: 'ERR_OSSL_EVP_UNSUPPORTED' error:0308010C:digital envelope routines::unsupported</a> appeared first on <a rel="nofollow" href="https://tech.yipp.ca">Techy Things</a>.</p>
]]></content:encoded>
			<wfw:commentRss>https://tech.yipp.ca/reactjs/code-err_ossl_evp_unsupported-error0308010cdigital-envelope-routinesunsupported/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TS2786: &#039;Button&#039; cannot be used as a JSX component</title>
		<link>https://tech.yipp.ca/reactjs/ts2786-button-used-jsx-component/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=ts2786-button-used-jsx-component</link>
		<comments>https://tech.yipp.ca/reactjs/ts2786-button-used-jsx-component/#comments</comments>
		<pubDate>Thu, 28 Dec 2023 22:39:23 +0000</pubDate>
		<dc:creator><![CDATA[frank]]></dc:creator>
				<category><![CDATA[reactjs]]></category>

		<guid isPermaLink="false">http://tech.yipp.ca/?p=4393</guid>
		<description><![CDATA[<p>When upgrading from react-scripts 4.X to 5.X Compiled with problems: × ERROR in src/App.tsx:51:10 TS2786: 'Button' cannot be used as a JSX component. Its return type 'ReactElement&#60;any, string &#124; JSXElementConstructor&#60;any&#62;&#62; &#124; null' is not&#46;&#46;&#46;</p>
<p>The post <a rel="nofollow" href="https://tech.yipp.ca/reactjs/ts2786-button-used-jsx-component/">TS2786: 'Button' cannot be used as a JSX component</a> appeared first on <a rel="nofollow" href="https://tech.yipp.ca">Techy Things</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>When upgrading from react-scripts 4.X to 5.X</p>
<pre>Compiled with problems:
×
ERROR in src/App.tsx:51:10
TS2786: 'Button' cannot be used as a JSX component.
 Its return type 'ReactElement&lt;any, string | JSXElementConstructor&lt;any&gt;&gt; | null' is not a valid JSX element.
 Type 'ReactElement&lt;any, string | JSXElementConstructor&lt;any&gt;&gt;' is not assignable to type 'Element'.
 Types of property 'key' are incompatible.
 Type 'Key | null' is not assignable to type 'string | null'.
 Type 'number' is not assignable to type 'string'.
 49 | &lt;div className="App"&gt;
 50 | &lt;header className="App-header"&gt;
 &gt; 51 | &lt;Button&gt;Click Me&lt;/Button&gt;
 | ^^^^^^
 52 | &lt;a
 53 | className="App-link"
 54 | href="https://reactjs.org"

</pre>
<p><a href="https://typescript.tv/errors/#TS2786" rel="noreferrer"><strong>Error TS2786</strong></a> often comes from a mismatch in <code>@types/react</code>.</p>
<p>Solution</p>
<p>Verify that your @types/react match with your react package version.</p>
<p>The post <a rel="nofollow" href="https://tech.yipp.ca/reactjs/ts2786-button-used-jsx-component/">TS2786: 'Button' cannot be used as a JSX component</a> appeared first on <a rel="nofollow" href="https://tech.yipp.ca">Techy Things</a>.</p>
]]></content:encoded>
			<wfw:commentRss>https://tech.yipp.ca/reactjs/ts2786-button-used-jsx-component/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The system will suspend now! How to stop Debian from going into suspend mode at login screen</title>
		<link>https://tech.yipp.ca/reactjs/system-will-suspend-now-stop-debian-going-suspend-mode-login-screen/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=system-will-suspend-now-stop-debian-going-suspend-mode-login-screen</link>
		<comments>https://tech.yipp.ca/reactjs/system-will-suspend-now-stop-debian-going-suspend-mode-login-screen/#comments</comments>
		<pubDate>Sat, 09 Sep 2023 01:34:34 +0000</pubDate>
		<dc:creator><![CDATA[frank]]></dc:creator>
				<category><![CDATA[reactjs]]></category>

		<guid isPermaLink="false">http://tech.yipp.ca/?p=4380</guid>
		<description><![CDATA[<p>Broadcast message from Debian-gdm@angel on tty1 (Fri 2023-09-08 21:33:20 EDT): The system will suspend now! Solution #1 $ sudo mkdir /etc/systemd/sleep.conf.d $ cd /etc/systemd/sleep.conf.d $ echo "[Sleep] AllowSuspend=no AllowHibernation=no AllowSuspendThenHibernate=no AllowHybridSleep=no" &#124; sudo tee&#46;&#46;&#46;</p>
<p>The post <a rel="nofollow" href="https://tech.yipp.ca/reactjs/system-will-suspend-now-stop-debian-going-suspend-mode-login-screen/">The system will suspend now! How to stop Debian from going into suspend mode at login screen</a> appeared first on <a rel="nofollow" href="https://tech.yipp.ca">Techy Things</a>.</p>
]]></description>
				<content:encoded><![CDATA[<pre>Broadcast message from Debian-gdm@angel on tty1 (Fri 2023-09-08 21:33:20 EDT):

The system will suspend now!</pre>
<h3>Solution #1</h3>
<pre>$ sudo mkdir /etc/systemd/sleep.conf.d
$ cd /etc/systemd/sleep.conf.d
$ echo "[Sleep] 
AllowSuspend=no 
AllowHibernation=no 
AllowSuspendThenHibernate=no 
AllowHybridSleep=no" | sudo tee nosuspend.conf</pre>
<h3>Bad Solution</h3>
<pre><span style="color: #ff0000;">$ systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target</span></pre>
<p>Don't use this even though it's mentioned first in the documentation, it will still result in attempts to put the system on sleep and result in SSH notifications, even though the system sleep will be ignored. Use instead solution #1</p>
<p>&nbsp;</p>
<p>The post <a rel="nofollow" href="https://tech.yipp.ca/reactjs/system-will-suspend-now-stop-debian-going-suspend-mode-login-screen/">The system will suspend now! How to stop Debian from going into suspend mode at login screen</a> appeared first on <a rel="nofollow" href="https://tech.yipp.ca">Techy Things</a>.</p>
]]></content:encoded>
			<wfw:commentRss>https://tech.yipp.ca/reactjs/system-will-suspend-now-stop-debian-going-suspend-mode-login-screen/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>You gave us a visitor for the node type ClassAccessorProperty but it&#039;s not a valid type</title>
		<link>https://tech.yipp.ca/reactjs/gave-us-visitor-node-type-classaccessorproperty-valid-type/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=gave-us-visitor-node-type-classaccessorproperty-valid-type</link>
		<comments>https://tech.yipp.ca/reactjs/gave-us-visitor-node-type-classaccessorproperty-valid-type/#comments</comments>
		<pubDate>Wed, 09 Aug 2023 01:40:31 +0000</pubDate>
		<dc:creator><![CDATA[frank]]></dc:creator>
				<category><![CDATA[reactjs]]></category>

		<guid isPermaLink="false">http://tech.yipp.ca/?p=4366</guid>
		<description><![CDATA[<p>21:02:54 Failed to compile. 21:02:54 21:02:54 ./src/js/app.tsx 21:02:54 Error: /var/lib/teamcity-agent/work/7538b1295f5e0d2c/src/js/app.tsx: You gave us a visitor for the node type ClassAccessorProperty but it's not a valid type Solution yarn add @babel/core@7.17.12</p>
<p>The post <a rel="nofollow" href="https://tech.yipp.ca/reactjs/gave-us-visitor-node-type-classaccessorproperty-valid-type/">You gave us a visitor for the node type ClassAccessorProperty but it's not a valid type</a> appeared first on <a rel="nofollow" href="https://tech.yipp.ca">Techy Things</a>.</p>
]]></description>
				<content:encoded><![CDATA[<pre>21:02:54 Failed to compile.
21:02:54
21:02:54 ./src/js/app.tsx
21:02:54 Error: /var/lib/teamcity-agent/work/7538b1295f5e0d2c/src/js/app.tsx: You gave us a visitor for the node type ClassAccessorProperty but it's not a valid type</pre>
<h3>Solution</h3>
<pre>yarn add @babel/core@7.17.12</pre>
<p>The post <a rel="nofollow" href="https://tech.yipp.ca/reactjs/gave-us-visitor-node-type-classaccessorproperty-valid-type/">You gave us a visitor for the node type ClassAccessorProperty but it's not a valid type</a> appeared first on <a rel="nofollow" href="https://tech.yipp.ca">Techy Things</a>.</p>
]]></content:encoded>
			<wfw:commentRss>https://tech.yipp.ca/reactjs/gave-us-visitor-node-type-classaccessorproperty-valid-type/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>React reload empty iframe cannot click anywhere</title>
		<link>https://tech.yipp.ca/reactjs/react-reload-empty-iframe-click-anywhere/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=react-reload-empty-iframe-click-anywhere</link>
		<comments>https://tech.yipp.ca/reactjs/react-reload-empty-iframe-click-anywhere/#comments</comments>
		<pubDate>Tue, 08 Aug 2023 20:44:55 +0000</pubDate>
		<dc:creator><![CDATA[frank]]></dc:creator>
				<category><![CDATA[reactjs]]></category>

		<guid isPermaLink="false">http://tech.yipp.ca/?p=4345</guid>
		<description><![CDATA[<p>https://stackoverflow.com/questions/70357360/process-is-not-defined-on-hot-reload Solution Add react-error-overlay 6.0.9 to "resolution" in package.json L "resolutions": { (...) "react-error-overlay": "6.0.9" }, </p>
<p>The post <a rel="nofollow" href="https://tech.yipp.ca/reactjs/react-reload-empty-iframe-click-anywhere/">React reload empty iframe cannot click anywhere</a> appeared first on <a rel="nofollow" href="https://tech.yipp.ca">Techy Things</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>https://stackoverflow.com/questions/70357360/process-is-not-defined-on-hot-reload</p>
<p>Solution</p>
<p>Add react-error-overlay 6.0.9 to "resolution" in package.json L</p>
<pre>  "resolutions": {
      (...)
    "react-error-overlay": "6.0.9"
  }, 
</pre>
<p>The post <a rel="nofollow" href="https://tech.yipp.ca/reactjs/react-reload-empty-iframe-click-anywhere/">React reload empty iframe cannot click anywhere</a> appeared first on <a rel="nofollow" href="https://tech.yipp.ca">Techy Things</a>.</p>
]]></content:encoded>
			<wfw:commentRss>https://tech.yipp.ca/reactjs/react-reload-empty-iframe-click-anywhere/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
