Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

about the react performance (how to improve it) #28586

Closed
ahmedmbarektorjmen opened this issue Mar 19, 2024 · 3 comments
Closed

about the react performance (how to improve it) #28586

ahmedmbarektorjmen opened this issue Mar 19, 2024 · 3 comments

Comments

@ahmedmbarektorjmen
Copy link

ahmedmbarektorjmen commented Mar 19, 2024

As a React developer, an idea struck me while I was walking: why not introduce a useSignal hook? Additionally, addressing the performance concerns, could we eliminate the need for rerendering the entire DOM and address React's perceived slowness, which is often attributed to JavaScript hydration and the size of react-dom?

To optimize React further, consider adding the useSignal hook to facilitate more efficient state management. Furthermore, revisiting the structure of react-dom, which currently includes substantial JavaScript, could lead to performance enhancements.
with react-dom in the app.js when bundled its about 72 kb !!
Another suggestion is the introduction of useStore, offering a lightweight alternative to using context, Redux, or Jotai for state management.

Enhancing HTML generation through the new React compiler like Qwik does could streamline the development process.
Removing hydration in favor of quick resumability and server-side rendering, similar to Qwik's approach, could improve React's performance and reduce the reliance on client-side components.

By transitioning to server components with server-side rendering (on load) and interactive elements could execute on the client side sith the need for a client componnent.
and if you wonder how to execute a client code so let me introduce you to the new useClient() hook.
This approach would minimize initial JavaScript downloads, fetching only the necessary chunks upon user interaction, similar to Qwik's methodology.

Considering these advancements could position React as the leading framework due to its intuitive syntax, leveraging its existing popularity and reputation. Your feedback on these proposals is crucial for shaping the future of React within the development community.

@pwbriggs
Copy link

@ahmedmbarektorjmen you already opened this issue in #28481.

@rickhanlonii
Copy link
Member

Closing as dupe #28481.

@rickhanlonii rickhanlonii closed this as not planned Won't fix, can't repro, duplicate, stale Mar 24, 2024
@ahmedmbarektorjmen
Copy link
Author

@ahmedmbarektorjmen you already opened this issue in #28481.

because no one answered me i reposted it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants