Add React Element Template
23
React-Element-Template.md
Normal file
23
React-Element-Template.md
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
```react
|
||||||
|
import React from 'react'
|
||||||
|
|
||||||
|
export const ElementTemplate = () => {
|
||||||
|
|
||||||
|
// 1. 🔧 Constants / config
|
||||||
|
|
||||||
|
// 2. 🔌 External hooks
|
||||||
|
|
||||||
|
// 3. 📦 State
|
||||||
|
|
||||||
|
// 4. 🧠 Derived values (memoized if needed)
|
||||||
|
|
||||||
|
// 5. 🎯 Handlers (grouped together)
|
||||||
|
|
||||||
|
// 6. ⚡ Effects
|
||||||
|
|
||||||
|
// 7. Render helpers (small pure functions)
|
||||||
|
|
||||||
|
// 8. 🎨 JSX (clean, minimal logic)
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
```
|
||||||
Reference in New Issue
Block a user