Explore tweets tagged as #reactnode
@mattpocockuk
Matt Pocock
2 years
ReactNode vs Element. Let's clear up the confusion. React.ReactNode: Anything a React component can render. JSX, string, null, undefined, number. JSX.Element: Just represents JSX.
12
84
861
@iamdillion
dillion - deeecode
2 years
ReactElement vs ReactNode TypeScript
2
4
27
@OyindaJr
Oyin 👩‍💻
1 year
"From optional to dynamic, I'm mastering Advanced Props in TypeScript React! Optional Props: Flexibility unlocked String Literals: Precision perfected Children Props: Nesting made easy React.ReactNode: Dynamic children demystified.
1
4
10
@saporito_eth
Saporito
2 years
Been digging into the react repo recently and came across the ReactNode type I wonder what the story behind the last type is 🤔
1
0
3
@alfonsusac
Alfon
11 months
Ever wondered what types of things react can render? It actually all defined within the `ReactNode` types. As you can see it consists of primitive types, ReactElement and other stuff. The ReactElement type actually contains both native JSX elements (like divs, sections, h1s)
0
4
22
@kasvmi02
フロントエンドエンジニアのゆで卵
2 years
childrenの型って、どれ使えばいいんだろう、、 1. FCにジェネリクスでPropsWithChildrenを指定して引数の型定義 2. 引数に直接PropsWithChildren型定義 3. エイリアスでReactNode型定義
1
0
6
@honey321998
honey32
2 years
よく考えたら、「props に ReactNode を渡す」だけで Server / Client 間で DI?制御の逆転?みたいなことが出来てしまうの、美しすぎるな… 十徳ナイフというより箸やこれは https://t.co/hxk8n41AdQ
2
10
137
@d151005
nino
2 years
Tips: ReactNodeからテキストを抽出する MDXの中身を抜いて fuse.js に検索ソースとして渡す際に使用したのでメモ。 via: react-node-to-string https://t.co/d7ouUXSCJ3
0
1
13
@honey321998
honey32
3 years
記事を投稿しました! 【React】Context を使う前に #2 コンポジション (ReactNode 型の Props) を使え [設計] on #Qiita
1
7
60
@danielmerja
Daniel | gotogether.ai
7 months
LLMs and our last engineer all use React.FC instead of just = function like this: const SystemNotificationsProvider = function ({ children, }: { children: ReactNode }) not this const SystemNotificationsProvider: React.FC<{ children: ReactNode }> = function ({ children }) {
0
0
0
@Hayao0819
山田ハヤオ🧊
2 years
これがNode これがElement これがNodeList これがHTMLCollection 全部同じじゃないですか!! 違いますよー これだから素人はダメだ!もっとよく見ろ! これがJSX.Element これがReactElement これがReactNode これがReact.FC (泡を吹いて倒れる)
1
65
292
@muhimasri
Muhi Masri
1 year
💡 Using ReactNode as a prop type in a #React component is a great way to allow flexibility in what can be passed as a prop. For example, a Card component could take a simple string title or a more advanced h1 element:
2
1
8
@sebastienlorber
Seb ⚛️ ThisWeekInReact.com
3 years
TypeScript 5.1 is now in RC 🙌 Improved JSX types for React coming soon 👌 - Support RSC async/await - Support returning any valid ReactNode (string, array...) https://t.co/JZWbvGZqVN
0
12
86
@ThisIsSingleton
James Singleton
2 years
Anyone else run into issues with @reactjs types where the 1st image no longer works, but the second one does... Basically have to surround {children} with a Fragment in order for not get "Type 'bigint' is not assignable to type 'ReactNode'."
0
0
0
@JobbermanGhana
@Jobbermanghana
4 months
#HiringAlert Full stack ReactNode developer: https://t.co/SvrQd9osdq Front-end mobile app developer: https://t.co/3MfMHY3NL1 Backend developer: https://t.co/ceJXTTfSZo Direct sales representatives: https://t.co/TMS4mk82Ft Social content specialist: https://t.co/jCP32cHNzM
2
1
3
@JiLiZART
Nikolay Kost 🎸 JS Devundefined
2 years
Представляете, используете вы тип React.FC повсеместно. А в React версии 18 берут и убирают оттуда children: ReactNode. А мне и представлять не надо!
5
0
12
@dimyasvariant
セイ
1 year
ReactNodeとReactElementの違いってなんだ?
0
0
6