···340340This ambiguity is also reflected in the fact that `JSON.stringify` will omit it:
341341342342```js
343343-['button', {
344344- children: 'Like'
343343+["button", {
344344+ children: "Like"
345345 // No onClick here :(
346346}]
347347```
···359359For that to work, we'd need to know which `<script>` tag to send and which function inside of that file is the click handler. We could encode it like this:
360360361361```js {3}
362362-['button', {
363363- children: 'Like',
364364- onClick: '/src/bundle.js#onLike'
362362+["button", {
363363+ children: "Like",
364364+ onClick: "/src/bundle.js#onLike"
365365}]
366366```
367367···444444The `'use client'` directive says: "when you import me, you don't get the real thing; you only get an address of that thing, something that lets you *refer* to it."
445445446446```js {3}
447447-['button', {
448448- children: 'Like',
449449- onClick: '/src/bundle.js#onLike'
447447+["button", {
448448+ children: "Like",
449449+ onClick: "/src/bundle.js#onLike"
450450}]
451451```
452452···465465Another common pattern is to keep `onLike` on the server and make it *callable* by the client--for example, via a POST `fetch()` call. We could encode it like this:
466466467467```js {3}
468468-['button', {
469469- children: 'Like',
470470- onClick: '/api?fn=onLike'
468468+["button", {
469469+ children: "Like",
470470+ onClick: "/api?fn=onLike"
471471}]
472472```
473473···511511The `'use server'` directive says: "when you try to serialize this function, turn it into a Server Reference--an address that the client can use to call this function."
512512513513```js {3}
514514-['button', {
515515- children: 'Like',
516516- onClick: '/api?fn=onLike'
514514+["button", {
515515+ children: "Like",
516516+ onClick: "/api?fn=onLike"
517517}]
518518```
519519···569569By the rules we've established earlier, during serialization, the server must run all functions that it encounters as tags. However, a Client Reference is not a function:
570570571571```js {1}
572572-['/src/bundle.js#LikeButton', {
573573- color: 'purple'
572572+["/src/bundle.js#LikeButton", {
573573+ color: "purple"
574574}]
575575```
576576···609609No matter which strategy we choose, all the necessary information is in the JSON:
610610611611```js
612612-['/src/bundle.js#LikeButton', {
613613- color: 'purple'
612612+["/src/bundle.js#LikeButton", {
613613+ color: "purple"
614614}]
615615```
616616