1.0.0 • Published 8 months ago

@packlify/client v1.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
8 months ago

@packlify/client

The @packlify/client module is a part of the Packlify Web SDK, designed to facilitate React hydration and client-side setups.

Table of Contents

Installation

You can add this package to your project using npm:

npm install @packlify/client

Features

This package provides:

  • A hydrate function to simplify client-side hydration for React apps
  • Built-in support for react-router-dom
  • Command-line tools for building React code

Usage

JavaScript/TypeScript

To use the hydrate function in your React app:

import { hydrate } from '@packlify/client';

// Your main component
import App from './App';

// Use the hydrate function
hydrate(App);

// Use it with React Router
hydrate(App, true);

Bin Files

The package comes with two command-line tools:

  • packlify-build-ssr: Builds server-side React code
  • packlify-build-client: Builds client-side React code

Run the following to execute:

npx packlify-build-ssr
npx packlify-build-client

Requirements

  • Node.js
  • React 18.2.0 or higher
  • react-router-dom 6.15.0 or higher

Contact

Lucas Farias lukf95@gmail.com LinkedIn - GitHub

1.0.0

8 months ago

0.0.0-alpha.1

8 months ago

0.0.0-alpha.0

8 months ago