{"_id":"rehackt","_rev":"7-ea0064146f965fb9cf22055c719f0564","name":"rehackt","dist-tags":{"latest":"0.1.0","snapshot":"0.0.0-pr.10.0"},"versions":{"0.0.1":{"name":"rehackt","version":"0.0.1","description":"A wrapper around React that will hide hooks from the React Server Component compiler","author":{"name":"Lenz Weber-Tronic"},"license":"MIT","peerDependencies":{"react":"*"},"main":"index.js","exports":{".":{"react-server":"./rsc.js","default":"./index.js"},"./package.json":"./package.json"},"gitHead":"71993ab50cfb5872a8caf13d6a7644f6b809fd0c","_id":"rehackt@0.0.1","_nodeVersion":"19.6.1","_npmVersion":"9.4.0","dist":{"integrity":"sha512-2E7Ng3Fi8STE9T4U737jRa30esXL8oGVP04JnooRxBAJyXnZfuqvUEYDWJ5JAVqT3jtv+yxDktOAgUjR942Q/Q==","shasum":"41bca74319a27e9d57395ffb1eaa3406b22276cf","tarball":"https://registry.npmjs.org/rehackt/-/rehackt-0.0.1.tgz","fileCount":3,"unpackedSize":2368,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDHKZCItKOL0yqh74YnAWdkGJL7o1QqUxVsl/DWYbhEnQIgFmxZQJ7JcCUO7v99KFZvLGW+cXtUWN4QDWzzQ9pqpSU="}]},"_npmUser":{"name":"phryneas","email":"mail@lenzw.de"},"directories":{},"maintainers":[{"name":"phryneas","email":"mail@lenzw.de"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rehackt_0.0.1_1686846606951_0.15887337426422565"},"_hasShrinkwrap":false},"0.0.2":{"name":"rehackt","version":"0.0.2","description":"A wrapper around React that will hide hooks from the React Server Component compiler","author":{"name":"Lenz Weber-Tronic"},"repository":{"type":"git","url":"git+https://github.com/phryneas/rehackt.git"},"homepage":"https://github.com/phryneas/rehackt","license":"MIT","peerDependencies":{"react":"*"},"main":"index.js","exports":{".":{"react-server":"./rsc.js","default":"./index.js"},"./package.json":"./package.json"},"gitHead":"a1e4b6de79a7a711c6cfe2e5a088b0ab64da38d2","bugs":{"url":"https://github.com/phryneas/rehackt/issues"},"_id":"rehackt@0.0.2","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-b5dR4T/weyVxKl1wZrBcKkgMmWiJb8ML984PBWqVWwsIGRVkVplPZD+iP6TraI6tIsNp2CkPj+CTte5zZ1rc/Q==","shasum":"30dc08f07113dc6afa6dbc1e098e481a3143d052","tarball":"https://registry.npmjs.org/rehackt/-/rehackt-0.0.2.tgz","fileCount":3,"unpackedSize":2520,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCijqg/z6r3VaHRws7lW2oYqXMrT0tri3PTpz2derTqugIhAN3RS7W6xmmHXGd4Cc7o6B0dadUyLygbTeDCCFaqnOPv"}]},"_npmUser":{"name":"phryneas","email":"mail@lenzw.de"},"directories":{},"maintainers":[{"name":"phryneas","email":"mail@lenzw.de"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rehackt_0.0.2_1686925270264_0.8474588393009195"},"_hasShrinkwrap":false},"0.0.3":{"name":"rehackt","version":"0.0.3","description":"A wrapper around React that will hide hooks from the React Server Component compiler","author":{"name":"Lenz Weber-Tronic"},"repository":{"type":"git","url":"git+https://github.com/phryneas/rehackt.git"},"homepage":"https://github.com/phryneas/rehackt","license":"MIT","main":"index.js","exports":{".":{"types":"./index.d.ts","react-server":"./rsc.js","default":"./index.js"},"./package.json":"./package.json"},"peerDependencies":{"react":"*","@types/react":"*"},"peerDependenciesMeta":{"react":{"optional":true},"@types/react":{"optional":true}},"devDependencies":{"react":"^18.3.0-canary-ab31a9ed2-20230824","@types/node":"^20.5.7"},"types":"./index.d.ts","gitHead":"324240c1a643325b9bbf9d814a07d83babaee3aa","bugs":{"url":"https://github.com/phryneas/rehackt/issues"},"_id":"rehackt@0.0.3","_nodeVersion":"18.17.1","_npmVersion":"9.6.7","dist":{"integrity":"sha512-aBRHudKhOWwsTvCbSoinzq+Lej/7R8e8UoPvLZo5HirZIIBLGAgdG7SL9QpdcBoQ7+3QYPi3lRLknAzXBlhZ7g==","shasum":"1ea454620d4641db8342e2db44595cf0e7ac6aa0","tarball":"https://registry.npmjs.org/rehackt/-/rehackt-0.0.3.tgz","fileCount":4,"unpackedSize":2674,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDnZRqIDAyytcXbdMNkLC8aIKEqJXmrr3zz90XdijudhAIgSjIcNRTiT/FVBwIy89RDIyY/DsdPsZh2d6z1a0DUXiI="}]},"_npmUser":{"name":"phryneas","email":"mail@lenzw.de"},"directories":{},"maintainers":[{"name":"phryneas","email":"mail@lenzw.de"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rehackt_0.0.3_1693232696836_0.0242037668671935"},"_hasShrinkwrap":false},"0.0.4":{"name":"rehackt","version":"0.0.4","description":"A wrapper around React that will hide hooks from the React Server Component compiler","author":{"name":"Lenz Weber-Tronic"},"repository":{"type":"git","url":"git+https://github.com/phryneas/rehackt.git"},"homepage":"https://github.com/phryneas/rehackt","license":"MIT","main":"index.js","exports":{".":{"types":"./index.d.ts","react-server":"./rsc.js","default":"./index.js"},"./package.json":"./package.json"},"peerDependencies":{"react":"*","@types/react":"*"},"peerDependenciesMeta":{"react":{"optional":true},"@types/react":{"optional":true}},"devDependencies":{"react":"^18.3.0-canary-ab31a9ed2-20230824","@types/node":"^20.5.7"},"_id":"rehackt@0.0.4","gitHead":"767e8f02748d26a6b1e3fa6122b8feb7fb21516c","types":"./index.d.ts","bugs":{"url":"https://github.com/phryneas/rehackt/issues"},"_nodeVersion":"18.19.0","_npmVersion":"10.2.3","dist":{"integrity":"sha512-xFroSGCbMEK/cTJVhq+c8l/AzIeMeojVyLqtZmr2jmIAFvePjapkCSGg9MnrcNk68HPaMxGf+Ndqozotu78ITw==","shasum":"dca5498e1f6c81d3d610ff2abfb3c3feec6afce8","tarball":"https://registry.npmjs.org/rehackt/-/rehackt-0.0.4.tgz","fileCount":5,"unpackedSize":5551,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICdCnrlfw8VLLsT3YuTGtLphqZ3YBBiS+HNcEUKL/KuhAiEAtmAJA+CCcSs+Q7O8b9E8r6ntOV+sZBBufxvB6Xeef10="}]},"_npmUser":{"name":"phryneas","email":"mail@lenzw.de"},"directories":{},"maintainers":[{"name":"phryneas","email":"mail@lenzw.de"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rehackt_0.0.4_1702495456561_0.3469341180763572"},"_hasShrinkwrap":false},"0.0.5":{"name":"rehackt","version":"0.0.5","description":"A wrapper around React that will hide hooks from the React Server Component compiler","author":{"name":"Lenz Weber-Tronic"},"repository":{"type":"git","url":"git+https://github.com/phryneas/rehackt.git"},"homepage":"https://github.com/phryneas/rehackt","license":"MIT","main":"index.js","exports":{".":{"types":"./index.d.ts","react-server":"./rsc.js","default":"./index.js"},"./package.json":"./package.json"},"peerDependencies":{"react":"*","@types/react":"*"},"peerDependenciesMeta":{"react":{"optional":true},"@types/react":{"optional":true}},"devDependencies":{"react":"^18.3.0-canary-ab31a9ed2-20230824","@types/node":"^20.5.7"},"prettier":{"printWidth":120},"_id":"rehackt@0.0.5","gitHead":"0e6704c5d57402e2e2f54544dbf1901d642cf083","types":"./index.d.ts","bugs":{"url":"https://github.com/phryneas/rehackt/issues"},"_nodeVersion":"18.19.0","_npmVersion":"10.2.3","dist":{"integrity":"sha512-BI1rV+miEkaHj8zd2n+gaMgzu/fKz7BGlb4zZ6HAiY9adDmJMkaDcmuXlJFv0eyKUob+oszs3/2gdnXUrzx2Tg==","shasum":"184c82ea369d5b0b989ede0593ebea8b2bcfb1d6","tarball":"https://registry.npmjs.org/rehackt/-/rehackt-0.0.5.tgz","fileCount":5,"unpackedSize":6975,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGXYKwnEkT5iw7teUyhYyTSTlgGsORwTttl8r2eGLyDRAiB0SMlnvEyoboCEWcf1vrbKCpk8q5gGbzZF3kjk8DVgQg=="}]},"_npmUser":{"name":"phryneas","email":"mail@lenzw.de"},"directories":{},"maintainers":[{"name":"phryneas","email":"mail@lenzw.de"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rehackt_0.0.5_1707913347020_0.23126264376486927"},"_hasShrinkwrap":false},"0.0.6":{"name":"rehackt","version":"0.0.6","description":"A wrapper around React that will hide hooks from the React Server Component compiler","author":{"name":"Lenz Weber-Tronic"},"repository":{"type":"git","url":"git+https://github.com/phryneas/rehackt.git"},"homepage":"https://github.com/phryneas/rehackt","license":"MIT","main":"index.js","exports":{".":{"types":"./index.d.ts","react-server":"./rsc.js","default":"./index.js"},"./package.json":"./package.json"},"peerDependencies":{"react":"*","@types/react":"*"},"peerDependenciesMeta":{"react":{"optional":true},"@types/react":{"optional":true}},"devDependencies":{"react":"^18.3.0-canary-ab31a9ed2-20230824","@types/node":"^20.5.7"},"prettier":{"printWidth":120},"_id":"rehackt@0.0.6","gitHead":"a42c837d82a376860707fff576e1499ca9fc60ec","types":"./index.d.ts","bugs":{"url":"https://github.com/phryneas/rehackt/issues"},"_nodeVersion":"18.19.1","_npmVersion":"10.2.4","dist":{"integrity":"sha512-l3WEzkt4ntlEc/IB3/mF6SRgNHA6zfQR7BlGOgBTOmx7IJJXojDASav+NsgXHFjHn+6RmwqsGPFgZpabWpeOdw==","shasum":"7a0a2247f2295e7548915417e44fbbf03bf004f4","tarball":"https://registry.npmjs.org/rehackt/-/rehackt-0.0.6.tgz","fileCount":6,"unpackedSize":8067,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/rehackt@0.0.6","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDDyLrRa3UzqNC2JBRX6zCOXbOxkBU4UA62V9tWfm4NxAiEArkSshFyxmwvEEczK2Tzgab3yTCaaX2NcZVb1Y1ZKIRg="}]},"_npmUser":{"name":"phryneas","email":"mail@lenzw.de"},"directories":{},"maintainers":[{"name":"phryneas","email":"mail@lenzw.de"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rehackt_0.0.6_1708725491215_0.15199144264101272"},"_hasShrinkwrap":false},"0.0.0-pr.10.0":{"name":"rehackt","version":"0.0.0-pr.10.0","description":"A wrapper around React that will hide hooks from the React Server Component compiler","author":{"name":"Lenz Weber-Tronic"},"repository":{"type":"git","url":"git+https://github.com/phryneas/rehackt.git"},"homepage":"https://github.com/phryneas/rehackt","license":"MIT","main":"index.js","exports":{".":{"types":"./index.d.ts","react-server":"./rsc.js","default":"./index.js"},"./package.json":"./package.json"},"peerDependencies":{"@types/react":"*","react":"*"},"peerDependenciesMeta":{"react":{"optional":true},"@types/react":{"optional":true}},"devDependencies":{"@types/node":"^20.5.7","react":"^19.0.0-canary-33a32441e9-20240418"},"prettier":{"printWidth":120},"_id":"rehackt@0.0.0-pr.10.0","readme":"# Rehackt\r\n\r\n> This package is fairly advanced and is only intended for library developers that want to maintain high interop with Next.js server actions.\r\n\r\nRehackt invisibly wraps `react` so that you're able to use shared imports with `react` in server-side Next.js code without throwing an error to your users.\r\n\r\n## Explainer\r\n\r\nAssume you have the following code in a Next.js codebase:\r\n\r\n```tsx\r\n\"use client\"\r\n\r\nimport { useFormState } from \"react-dom\"\r\nimport someAction from \"./action\";\r\n\r\nexport const ClientComp = () => {\r\n  const [data, action] = useFormState(someAction, \"Hello client\");\r\n\r\n  return <form action={action}>\r\n    <p>{data}</p>\r\n    <button type={\"submit\"}>Update data</button>\r\n  </form>\r\n}\r\n```\r\n\r\n```tsx\r\n\"use server\"\r\n// action.ts\r\n\r\nimport {data} from \"./shared-code\";\r\n\r\nexport default async function someAction() {\r\n  return \"Hello \" + data.name;\r\n}\r\n```\r\n\r\n```tsx\r\n// shared-code.ts\r\nimport {useState} from \"react\";\r\n\r\nexport const data = {\r\n  useForm: <T>(val: T) => {\r\n      useState(val)\r\n  },\r\n  name: \"server\"\r\n}\r\n```\r\n\r\nWhile you're not intending to use `data.useForm` in your `action.ts` server-only file, you'll still receive the following error from Next.js' build process when trying to use this code:\r\n\r\n```shell\r\n./src/app/shared-code.ts\r\nReactServerComponentsError:\r\n\r\nYou're importing a component that needs useState. It only works in a Client Component but none of its parents are marked with \"use client\", so they're Server Components by default.\r\nLearn more: https://nextjs.org/docs/getting-started/react-essentials\r\n\r\n   ╭─[/src/app/shared-code.ts:1:1]\r\n 1 │ import {useState} from \"react\";\r\n   ·         ────────\r\n 2 │ \r\n 3 │ export const data = {\r\n 3 │   useForm: <T>(val: T) => {\r\n   ╰────\r\n\r\nMaybe one of these should be marked as a client entry with \"use client\":\r\n./src/app/shared-code.ts\r\n./src/app/action.ts\r\n```\r\n\r\nThis is because Next.js statically analyzes usage of `useState` to ensure it's not being utilized in server-only code.\r\n\r\nBy replacing the import from `react` to `rehackt`:\r\n\r\n```tsx\r\n// shared-code.ts\r\nimport {useState} from \"rehackt\";\r\n\r\nexport const data = {\r\n  useForm: <T>(val: T) => {\r\n      useState(val)\r\n  },\r\n  name: \"server\"\r\n}\r\n```\r\n\r\nYou'll no longer see this error.\r\n\r\n> Keep in mind, this does not enable usage of `useState` in server-only code, this just removes the error described above.\r\n\r\n## Further Reading\r\n\r\nThe following is a list of reading resources that pertain to this package:\r\n\r\n- [My take on the current React & Server Components controversy - Lenz Weber-Tronic](https://phryneas.de/react-server-components-controversy)\r\n\r\n- [apollographql/apollo-client#10974](https://github.com/apollographql/apollo-client/issues/10974)\r\n\r\n- [TanStack/form#480](https://github.com/TanStack/form/issues/480#issuecomment-1793576645)\r\n","readmeFilename":"README.md","gitHead":"a83bf86c89a375b9c5d354c4f6a14055526fba82","types":"./index.d.ts","bugs":{"url":"https://github.com/phryneas/rehackt/issues"},"_nodeVersion":"18.20.2","_npmVersion":"10.5.0","dist":{"integrity":"sha512-RG3QtgONbhnW6BIoAX9ZOrkNIfhblgFUjM+UDyXRsnT3eLHZslWUAHhikIkLe41P8hWf9vZBi3yjfb12N+JVfw==","shasum":"715861bf228a7306243ee900a077182ebb463bd8","tarball":"https://registry.npmjs.org/rehackt/-/rehackt-0.0.0-pr.10.0.tgz","fileCount":6,"unpackedSize":10124,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/rehackt@0.0.0-pr.10.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDdFbGCso3Z0ABzMceeSZgwIOJMg1Eh1ueGam9P8hy8WwIhAMkebL2IBvu4FMrkWLDSfXmJoVbA1PMx9EjVaZkAd/Zp"}]},"_npmUser":{"name":"phryneas","email":"mail@lenzw.de"},"directories":{},"maintainers":[{"name":"phryneas","email":"mail@lenzw.de"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rehackt_0.0.0-pr.10.0_1713779385680_0.9706141598619316"},"_hasShrinkwrap":false},"0.1.0":{"name":"rehackt","version":"0.1.0","description":"A wrapper around React that will hide hooks from the React Server Component compiler","author":{"name":"Lenz Weber-Tronic"},"repository":{"type":"git","url":"git+https://github.com/phryneas/rehackt.git"},"homepage":"https://github.com/phryneas/rehackt","license":"MIT","main":"index.js","exports":{".":{"types":"./index.d.ts","react-server":"./rsc.js","default":"./index.js"},"./package.json":"./package.json"},"peerDependencies":{"@types/react":"*","react":"*"},"peerDependenciesMeta":{"react":{"optional":true},"@types/react":{"optional":true}},"devDependencies":{"@types/node":"^20.5.7","react":"^19.0.0-canary-33a32441e9-20240418"},"prettier":{"printWidth":120},"_id":"rehackt@0.1.0","gitHead":"1150f7e2b8dae52ba5231bde1a42595839dd9603","types":"./index.d.ts","bugs":{"url":"https://github.com/phryneas/rehackt/issues"},"_nodeVersion":"18.20.2","_npmVersion":"10.5.0","dist":{"integrity":"sha512-7kRDOuLHB87D/JESKxQoRwv4DzbIdwkAGQ7p6QKGdVlY1IZheUnVhlk/4UZlNUVxdAXpyxikE3URsG067ybVzw==","shasum":"a7c5e289c87345f70da8728a7eb878e5d03c696b","tarball":"https://registry.npmjs.org/rehackt/-/rehackt-0.1.0.tgz","fileCount":6,"unpackedSize":10118,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/rehackt@0.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHRnOVRlmfEaUTGvLG5pAg5upbP2aBtVYLFDEDUs0HbCAiA9uIYQMivhg1xXVUZUWeMZ4RI87+WDMDQ4wx9z7Hk/hg=="}]},"_npmUser":{"name":"phryneas","email":"mail@lenzw.de"},"directories":{},"maintainers":[{"name":"phryneas","email":"mail@lenzw.de"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rehackt_0.1.0_1713862504317_0.9343255824208265"},"_hasShrinkwrap":false}},"time":{"created":"2023-06-15T16:30:06.950Z","0.0.1":"2023-06-15T16:30:07.169Z","modified":"2024-04-23T08:55:04.860Z","0.0.2":"2023-06-16T14:21:10.446Z","0.0.3":"2023-08-28T14:24:57.048Z","0.0.4":"2023-12-13T19:24:16.734Z","0.0.5":"2024-02-14T12:22:27.321Z","0.0.6":"2024-02-23T21:58:11.381Z","0.0.0-pr.10.0":"2024-04-22T09:49:45.832Z","0.1.0":"2024-04-23T08:55:04.459Z"},"maintainers":[{"name":"phryneas","email":"mail@lenzw.de"}],"description":"A wrapper around React that will hide hooks from the React Server Component compiler","author":{"name":"Lenz Weber-Tronic"},"license":"MIT","readme":"# Rehackt\r\n\r\n> This package is fairly advanced and is only intended for library developers that want to maintain high interop with Next.js server actions.\r\n\r\nRehackt invisibly wraps `react` so that you're able to use shared imports with `react` in server-side Next.js code without throwing an error to your users.\r\n\r\n## Explainer\r\n\r\nAssume you have the following code in a Next.js codebase:\r\n\r\n```tsx\r\n\"use client\"\r\n\r\nimport { useFormState } from \"react-dom\"\r\nimport someAction from \"./action\";\r\n\r\nexport const ClientComp = () => {\r\n  const [data, action] = useFormState(someAction, \"Hello client\");\r\n\r\n  return <form action={action}>\r\n    <p>{data}</p>\r\n    <button type={\"submit\"}>Update data</button>\r\n  </form>\r\n}\r\n```\r\n\r\n```tsx\r\n\"use server\"\r\n// action.ts\r\n\r\nimport {data} from \"./shared-code\";\r\n\r\nexport default async function someAction() {\r\n  return \"Hello \" + data.name;\r\n}\r\n```\r\n\r\n```tsx\r\n// shared-code.ts\r\nimport {useState} from \"react\";\r\n\r\nexport const data = {\r\n  useForm: <T>(val: T) => {\r\n      useState(val)\r\n  },\r\n  name: \"server\"\r\n}\r\n```\r\n\r\nWhile you're not intending to use `data.useForm` in your `action.ts` server-only file, you'll still receive the following error from Next.js' build process when trying to use this code:\r\n\r\n```shell\r\n./src/app/shared-code.ts\r\nReactServerComponentsError:\r\n\r\nYou're importing a component that needs useState. It only works in a Client Component but none of its parents are marked with \"use client\", so they're Server Components by default.\r\nLearn more: https://nextjs.org/docs/getting-started/react-essentials\r\n\r\n   ╭─[/src/app/shared-code.ts:1:1]\r\n 1 │ import {useState} from \"react\";\r\n   ·         ────────\r\n 2 │ \r\n 3 │ export const data = {\r\n 3 │   useForm: <T>(val: T) => {\r\n   ╰────\r\n\r\nMaybe one of these should be marked as a client entry with \"use client\":\r\n./src/app/shared-code.ts\r\n./src/app/action.ts\r\n```\r\n\r\nThis is because Next.js statically analyzes usage of `useState` to ensure it's not being utilized in server-only code.\r\n\r\nBy replacing the import from `react` to `rehackt`:\r\n\r\n```tsx\r\n// shared-code.ts\r\nimport {useState} from \"rehackt\";\r\n\r\nexport const data = {\r\n  useForm: <T>(val: T) => {\r\n      useState(val)\r\n  },\r\n  name: \"server\"\r\n}\r\n```\r\n\r\nYou'll no longer see this error.\r\n\r\n> Keep in mind, this does not enable usage of `useState` in server-only code, this just removes the error described above.\r\n\r\n## Further Reading\r\n\r\nThe following is a list of reading resources that pertain to this package:\r\n\r\n- [My take on the current React & Server Components controversy - Lenz Weber-Tronic](https://phryneas.de/react-server-components-controversy)\r\n\r\n- [apollographql/apollo-client#10974](https://github.com/apollographql/apollo-client/issues/10974)\r\n\r\n- [TanStack/form#480](https://github.com/TanStack/form/issues/480#issuecomment-1793576645)\r\n","readmeFilename":"README.md","homepage":"https://github.com/phryneas/rehackt","repository":{"type":"git","url":"git+https://github.com/phryneas/rehackt.git"},"bugs":{"url":"https://github.com/phryneas/rehackt/issues"}}