Coder Social home page Coder Social logo

용어: Directive about ko.react.dev HOT 2 OPEN

da-in avatar da-in commented on May 10, 2024 1
용어: Directive

from ko.react.dev.

Comments (2)

HwangSunBeom avatar HwangSunBeom commented on May 10, 2024

관련 내용이 #810 에서도 등장해 함께 이야기되면 좋을 것 같습니다.

When a 'use client' file is imported from another client file, the directive has no effect.

To reduce client bundle size and take full advantage of the server, move state (and the 'use client' directives) lower in the tree when possible, and pass rendered server components as children to client components.

Because props are serialized across the server–client boundary, note that the placement of these directives can affect the amount of data sent to the client; avoid data structures that are larger than necessary.

Directives like 'use client' must be at the very beginning of a file, above any imports or other code (comments above directives are OK). They must be written with single or double quotes, not backticks. (The 'use xyz' directive format somewhat resembles the useXyz() Hook naming convention, but the similarity is coincidental.)

from ko.react.dev.

gnujoow avatar gnujoow commented on May 10, 2024

Directives provide instructions to bundlers compatible with React Server Components.

Directives가 서버 혹은 클라이언트에서 실행되는지 지시해주는 계념으로 이해합니다. "지시어"로 번역을 해보면 어떨까 제안합니다.

from ko.react.dev.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.