|
8 | 8 | <img src="https://img.shields.io/badge/React-61DAFB.svg?style&logo=React&logoColor=black" alt="React" />
|
9 | 9 | <img src="https://img.shields.io/badge/TypeScript-3178C6.svg?style&logo=TypeScript&logoColor=white" alt="TypeScript" />
|
10 | 10 | </p>
|
11 |
| -<img src="https://img.shields.io/github/license/immiProgrammer/emittor?style&color=5D6D7E" alt="GitHub license" /> |
12 |
| -<img src="https://img.shields.io/github/last-commit/immiProgrammer/emittor?style&color=5D6D7E" alt="git-last-commit" /> |
13 |
| -<img src="https://img.shields.io/github/commit-activity/m/immiProgrammer/emittor?style&color=5D6D7E" alt="GitHub commit activity" /> |
14 |
| -<img src="https://img.shields.io/github/languages/top/immiProgrammer/emittor?style&color=5D6D7E" alt="GitHub top language" /> |
| 11 | +<img src="https://img.shields.io/bundlephobia/min/emittor" alt="minified size" /> |
| 12 | +<img src="https://img.shields.io/github/last-commit/programming-with-ia/emittor" alt="git-last-commit" /> |
| 13 | +<img src="https://img.shields.io/github/commit-activity/m/programming-with-ia/emittor" alt="GitHub commit activity" /> |
| 14 | +<img src="https://img.shields.io/github/languages/top/programming-with-ia/emittor" alt="GitHub top language" /> |
15 | 15 | </div>
|
16 | 16 |
|
17 | 17 | ---
|
@@ -82,24 +82,6 @@ This adjusted code snippet provides a simple and easy-to-understand usage exampl
|
82 | 82 |
|
83 | 83 | </br>
|
84 | 84 |
|
85 |
| -Also, use a method that can change only the state without re-rendering this component when the state is changed. |
86 |
| - |
87 |
| -```tsx |
88 |
| -"use client"; |
89 |
| - |
90 |
| -import { countEmittor } from "./lib/emittor" |
91 |
| - |
92 |
| -function Page() { |
93 |
| - return ( |
94 |
| - <button onClick={()=>countEmittor.setState(countEmittor.state+1)}>Add</button> |
95 |
| - ) |
96 |
| -} |
97 |
| - |
98 |
| -export default Page |
99 |
| -``` |
100 |
| - |
101 |
| -</br> |
102 |
| - |
103 | 85 | ## Emittor In Multiple Components
|
104 | 86 |
|
105 | 87 | The emittor package enables automatic state synchronization across React components. By simply integrating emittor, any component subscribing to state changes will update whenever the state changes anywhere in the application. This eliminates the need for manual state passing or provider wrapping, streamlining development and enhancing component responsiveness.
|
@@ -252,40 +234,8 @@ export default function Page() {
|
252 | 234 | }
|
253 | 235 | ```
|
254 | 236 |
|
255 |
| ---- |
256 |
| - |
257 |
| -## 🤝 Contributing |
258 |
| - |
259 |
| -Contributions are always welcome! Please follow these steps: |
260 |
| - |
261 |
| -1. Fork the project repository. This creates a copy of the project on your account that you can modify without affecting the original project. |
262 |
| -2. Clone the forked repository to your local machine using a Git client like Git or GitHub Desktop. |
263 |
| -3. Create a new branch with a descriptive name (e.g., `new-feature-branch` or `bugfix-issue-123`). |
264 |
| - |
265 |
| - ```sh |
266 |
| - git checkout -b new-feature-branch |
267 |
| - ``` |
268 |
| - |
269 |
| -4. Make changes to the project's codebase. |
270 |
| -5. Commit your changes to your local branch with a clear commit message that explains the changes you've made. |
271 |
| - |
272 |
| - ```sh |
273 |
| - git commit -m 'Implemented new feature.' |
274 |
| - ``` |
275 |
| - |
276 |
| -6. Push your changes to your forked repository on GitHub using the following command |
277 |
| - |
278 |
| - ```sh |
279 |
| - git push origin new-feature-branch |
280 |
| - ``` |
281 |
| - |
282 |
| -7. Create a new pull request to the original project repository. In the pull request, describe the changes you've made and why they're necessary. |
283 |
| - The project maintainers will review your changes and provide feedback or merge them into the main branch. |
284 |
| - |
285 |
| ---- |
| 237 | +</br> |
286 | 238 |
|
287 | 239 | ## 📄 License
|
288 | 240 |
|
289 | 241 | This project is licensed under the `ℹ️ MIT` License.
|
290 |
| - |
291 |
| ---- |
0 commit comments