react-dom/server API๋ฅผ ์‚ฌ์šฉํ•˜๋ฉด React ์ปดํฌ๋„ŒํŠธ๋ฅผ ์„œ๋ฒ„์—์„œ HTML๋กœ ๋ Œ๋”๋งํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์ด API๋Š” ์•ฑ์˜ ์ตœ์ƒ์œ„ ๋ ˆ๋ฒจ์— ์žˆ๋Š” ์„œ๋ฒ„์—์„œ๋งŒ ์ดˆ๊ธฐ HTML์„ ์ƒ์„ฑํ•˜๋Š” ๋ฐ ์‚ฌ์šฉ๋ฉ๋‹ˆ๋‹ค. ํ”„๋ ˆ์ž„์›Œํฌ๊ฐ€ ๋Œ€์‹  ํ˜ธ์ถœํ•  ์ˆ˜๋„ ์žˆ์Šต๋‹ˆ๋‹ค. ๋Œ€๋ถ€๋ถ„์˜ ์ปดํฌ๋„ŒํŠธ๋Š” ์ด๋ฅผ ๊ฐ€์ ธ์˜ค๊ฑฐ๋‚˜ ์‚ฌ์šฉํ•  ํ•„์š”๊ฐ€ ์—†์Šต๋‹ˆ๋‹ค.


Server APIs for Node.js Streams

๋‹ค์Œ ๋ฉ”์„œ๋“œ๋“ค์€ Node.js Streams์ด ์žˆ๋Š” ํ™˜๊ฒฝ์—์„œ๋งŒ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค:


Server APIs for Web Streams

๋‹ค์Œ ๋ฉ”์„œ๋“œ๋“ค์€ ๋ธŒ๋ผ์šฐ์ €, Deno ๋ฐ ์ผ๋ถ€ ์ตœ์‹  ์—ฃ์ง€ ๋Ÿฐํƒ€์ž„์„ ํฌํ•จํ•˜๋Š” Web Streams์ด ์žˆ๋Š” ํ™˜๊ฒฝ์—์„œ๋งŒ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค:


Server APIs for non-streaming environments

๋‹ค์Œ ๋ฉ”์„œ๋“œ๋“ค์€ ์ŠคํŠธ๋ฆผ์„ ์ง€์›ํ•˜์ง€ ์•Š๋Š” ํ™˜๊ฒฝ์—์„œ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค:

  • renderToString์€ React ํŠธ๋ฆฌ๋ฅผ ๋ฌธ์ž์—ด๋กœ ๋ Œ๋”๋งํ•ฉ๋‹ˆ๋‹ค.
  • renderToStaticMarkup์€ ์ƒํ˜ธ์ž‘์šฉํ•˜์ง€ ์•Š๋Š” React ํŠธ๋ฆฌ๋ฅผ HTML ๋ฌธ์ž์—ด๋กœ ๋ Œ๋”๋งํ•ฉ๋‹ˆ๋‹ค.

์œ„ ๋ฉ”์„œ๋“œ๋“ค์€ ์ŠคํŠธ๋ฆฌ๋ฐ API์™€ ๋น„๊ตํ•˜์—ฌ ๊ธฐ๋Šฅ์ด ์ œํ•œ์ ์ž…๋‹ˆ๋‹ค.


Deprecated server APIs

๋” ์ด์ƒ ์‚ฌ์šฉ๋˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค

์ด API๋Š” ์ถ”ํ›„ React major ๋ฒ„์ „์—์„œ ์ œ๊ฑฐ๋  ์˜ˆ์ •์ž…๋‹ˆ๋‹ค.