Skip to content

Commit f87cbfe

Browse files
committed
feat: add SolidJSFramework component with documentation and best practices
1 parent 26b8e4c commit f87cbfe

1 file changed

Lines changed: 73 additions & 0 deletions

File tree

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
/* eslint-disable @next/next/no-img-element */
2+
const SolidJSFramework = () => {
3+
return (
4+
<div className='bg-primary flex items-center justify-center'>
5+
<div className='max-w-2xl text-center'>
6+
<div className='flex flex-wrap items-center justify-center'>
7+
<img
8+
src='https://img.shields.io/badge/Solid%20JS-blue?style=for-the-badge&logo=solid&logoColor=white'
9+
alt='SolidJS'
10+
className='mb-10 h-16 rounded-sm'
11+
/>
12+
</div>
13+
14+
<h2 className='mb-4 text-2xl font-bold'>What is Solid.js?</h2>
15+
<p className='mb-4'>
16+
Solid is a declarative JavaScript library for building user
17+
interfaces, developed by Ryan Carniato. It focuses on fine grained
18+
reactivity and compiler optimized rendering, enabling highly
19+
performant applications with minimal overhead. Solid uses JSX for
20+
templating, but unlike virtual DOM frameworks, it compiles templates
21+
to real DOM updates at build time.
22+
</p>
23+
24+
<h2 className='mb-4 text-2xl font-bold'>Why Use Solid.js?</h2>
25+
<p className='mb-6'>
26+
Solid is ideal for developers seeking top-tier performance without
27+
sacrificing modern developer ergonomics. With no virtual DOM and a
28+
highly efficient reactivity model, Solid delivers blazing-fast
29+
rendering and extremely low memory usage. It's especially well-suited
30+
for performance-critical applications, interactive UIs, and projects
31+
that value fine control over reactivity.
32+
</p>
33+
34+
<h4 className='my-4 text-2xl font-bold'>
35+
Solid.js Best Practices and Coding Style Guide
36+
</h4>
37+
<ul>
38+
<li>
39+
- Leverage Solid’s reactive primitives like `createSignal`,
40+
`createEffect`, and `createMemo`.
41+
</li>
42+
<li>
43+
- Avoid unnecessary state nesting to keep reactivity fine-grained.
44+
</li>
45+
<li>
46+
- Use JSX as the templating language, but remember it compiles to
47+
DOM instructions.
48+
</li>
49+
<li>
50+
- Minimize the use of external state management libraries. Solid's
51+
built-in reactivity is often sufficient.
52+
</li>
53+
<li>
54+
- Prefer composable functions and reusable components for clean,
55+
modular code.
56+
</li>
57+
</ul>
58+
59+
<br />
60+
<a
61+
target='_blank'
62+
rel='noopener noreferrer'
63+
href='https://docs.solidjs.com/'
64+
className='text-xl font-bold underline hover:text-blue-400'
65+
>
66+
Solid.js - Official Documentation
67+
</a>
68+
</div>
69+
</div>
70+
)
71+
}
72+
73+
export default SolidJSFramework

0 commit comments

Comments
 (0)