Skip to content

boutsoniya/render-delegation-sample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Render Delegation React Component Sample

A clean, modern demonstration of the Render Delegation Pattern (Render Props / Children-as-a-Function) in React, styled with Tailwind CSS and bundled using Vite.

🚀 Concept

Render delegation separates State & Logic from UI & Presentation.

  • ToggleLogic.jsx acts as the engine—managing an isOn boolean and a toggle function.
  • It passes these properties down dynamically, allowing two completely separate UI states (a functional Switch and an expandable Accordion) to use the exact same state engine.

📁 Tech Stack

  • React
  • Vite
  • Tailwind CSS

🛠️ Installation & Run

  1. Clone the repository:
    git clone [https://github.com/boutsoniya/render-delegation-react-component-sample.git](https://github.com/boutsoniya/render-delegation-react-component-sample.git)

About

A modern React demonstration of the Render Delegation (Render Props) architectural pattern. Built with Vite and Tailwind CSS, this project showcases how to completely isolate complex stateful logic into a reusable container that delegates 100% of its UI rendering to consumer components.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors