@lolyjs/core 0.2.0-alpha.11 → 0.2.0-alpha.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -84,10 +84,7 @@ export const getServerSideProps: ServerLoader = async (ctx) => {
84
84
 
85
85
  ```tsx
86
86
  // app/page.tsx
87
- import { usePageProps } from "@lolyjs/core/hooks";
88
-
89
- export default function Home() {
90
- const { props } = usePageProps();
87
+ export default function Home({ props }) {
91
88
  return <h1>{props.data}</h1>;
92
89
  }
93
90
  ```
@@ -519,15 +516,12 @@ export const events = [
519
516
  ];
520
517
  ```
521
518
 
522
- ### Client Hooks
519
+ ### Client Cache
523
520
 
524
521
  ```tsx
525
- import { usePageProps } from "@lolyjs/core/hooks";
526
522
  import { revalidate } from "@lolyjs/core/client-cache";
527
523
 
528
- export default function Page() {
529
- const { params, props } = usePageProps();
530
-
524
+ export default function Page({ props }) {
531
525
  const handleRefresh = async () => {
532
526
  await revalidate(); // Refresh current page data
533
527
  };
@@ -730,7 +724,6 @@ import { logger, createModuleLogger, getRequestLogger } from "@lolyjs/core";
730
724
 
731
725
  // Client
732
726
  import { Link } from "@lolyjs/core/components";
733
- import { usePageProps } from "@lolyjs/core/hooks";
734
727
  import { lolySocket } from "@lolyjs/core/sockets";
735
728
  import { revalidate, revalidatePath } from "@lolyjs/core/client-cache";
736
729
  ```