-
Notifications
You must be signed in to change notification settings - Fork 0
Update README.md for improved formatting and readability #3
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
Open
Hammadhammad2
wants to merge
2
commits into
main
Choose a base branch
from
test
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Hammadhammad2
commented
Aug 19, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
--- a/README.md
+++ b/README.md
@@ -1,4 +1,5 @@
-This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).
+This is a [Next.js](https://nextjs.org/) project bootstrapped with
+[`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).
## Getting Started
@@ -14,11 +15,15 @@ pnpm dev
bun dev
''
-Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
+this is a test comment
+Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
-You can start editing the page by modifying `app/page.js`. The page auto-updates as you edit the file.
+You can start editing the page by modifying `app/page.js`. The page auto-updates as you
+edit the file.
-This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font.
+This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization)
+to automatically optimize and load Inter, a custom Google Font.
## Learn More
@@ -27,10 +32,14 @@ To learn more about Next.js, take a look at the following resources:
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
-You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!
+You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) -
+your feedback and contributions are welcome!
## Deploy on Vercel
-The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
+The easiest way to deploy your Next.js app is to use the
+[Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme)
+from the creators of Next.js.
-Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
+Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for
+more details.
- Most changes are line wraps to improve readability, which is a good practice for Markdown files.
+Consider removing this line as it appears to be a temporary comment and doesn't add value to theREADME.md
.
Hammadhammad2
commented
Aug 19, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fichier : README.md
@@ -1,4 +1,5 @@
This is a [Next.js](https://nextjs.org/) project bootstrapped with
[`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).
- This change seems to be purely for reformatting, likely to wrap the line for readability or to adhere to a specific line length limit. While generally good for readability, ensure this doesn't conflict with any markdown linters or auto-formatters in the CI/CD pipeline if they're not consistently applied.
@@ -14,11 +15,15 @@ pnpm dev
bun dev
''
+this is a test comment
+
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
- This line appears to be a placeholder or a test comment that was accidentally committed. It should be removed as it doesn't add value to the README.
@@ -17,10 +18,14 @@ You can start editing the page by modifying `app/page.js`. The page auto-updates as you edit the file.
-This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font.
+You can start editing the page by modifying `app/page.js`. The page auto-updates as you
+edit the file.
+This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization)
+to automatically optimize and load Inter, a custom Google Font.
- Similar to the first change, these are reformatting changes for line wrapping. Consistent application of line wrapping rules improves readability.
@@ -27,10 +32,14 @@ To learn more about Next.js, take a look at the following resources:
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
-You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!
+You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) -
+your feedback and contributions are welcome!
## Deploy on Vercel
- Another instance of line wrapping for readability.
@@ -32,10 +37,14 @@ The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
-Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
+The easiest way to deploy your Next.js app is to use the
+[Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme)
+from the creators of Next.js.
+Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for
+more details.
- More line wrapping. These formatting changes are generally harmless and can improve readability of long lines. The main concern here is the accidental "test comment".
…rendering logic; address missing dependencies, unused variables/functions, and improve styling practices.
Hammadhammad2
commented
Aug 19, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fichier : README.md
@@ -1,4 +1,5 @@
This is a [Next.js](https://nextjs.org/) project bootstrapped with
[`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).
+<!-- It's generally better to avoid unnecessary line breaks in the middle of a sentence in a README, as it can make it harder to read. Consider if this formatting improves readability. -->
## Getting Started
@@ -14,11 +15,15 @@ pnpm dev
bun dev
''
+<!-- This looks like a temporary comment for testing. It should be removed before merging to avoid cluttering the README. -->
+this is a test comment
+
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
You can start editing the page by modifying `app/page.js`. The page auto-updates as you
edit the file.
+<!-- Same comment as above regarding line breaks in sentences. -->
This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization)
to automatically optimize and load Inter, a custom Google Font.
@@ -27,10 +32,14 @@ To learn more about Next.js, take a look at the following resources:
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
+<!-- Same comment as above regarding line breaks in sentences. -->
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) -
your feedback and contributions are welcome!
## Deploy on Vercel
+<!-- Same comment as above regarding line breaks in sentences. -->
The easiest way to deploy your Next.js app is to use the
[Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme)
from the creators of Next.js.
+<!-- Same comment as above regarding line breaks in sentences. -->
Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for
more details.
Fichier : src/app/testPage/anyPage.js
@@ -1,33 +1,62 @@
+import { useState, useEffect } from 'react';
+
export default function AnyPage() {
- return (
- <div>
- <h1>Any Page</h1>
- </div>
- );
+ const [count, setCount] = useState(0);
+ const [data, setData] = useState([]);
+ const unusedVariable = 'this is never used';
+
+ // Missing dependency in useEffect
+ useEffect(() => {
+ console.log('Component mounted');
+ // Avoid direct DOM manipulation with React. Use useRef for references or manage state.
+ document.getElementById('some-element').innerHTML = 'Direct DOM manipulation';
+ // `setData` is a state setter and should be listed as a dependency if it's not guaranteed to be stable (though usually it is).
+ // However, in this case, the `useEffect` runs only once (`[]`), and `setData` is stable.
+ // The more critical issue is the direct DOM manipulation and `console.log`.
+ setData([1, 2, 3, 4, 5]);
+ }, []); // Missing dependency: setData
+
+ // Unused function
+ // This function is declared but never called. It should be removed if not needed.
+ function unusedFunction() {
+ return 'never called';
+ }
+
+ // Missing key prop in map
+ const renderItems = () => {
+ return data.map(item => (
+ // Each child in a list should have a unique "key" prop. This helps React identify which items have changed, are added, or are removed.
+ // A good key would be a unique ID from the `item` itself, or `index` as a last resort if items are static and not reordered.
+ <div>{item}</div> // Missing key prop
+ ));
+ };
+
+ // Inline styles instead of CSS classes
+ // While functional, inline styles can make styling harder to manage and reuse.
+ // Consider using CSS modules, styled-components, or a utility-first CSS framework (like Tailwind CSS) for better maintainability and performance.
+ const inlineStyle = {
+ color: 'red',
+ fontSize: '16px',
+ };
+
+ // Console.log in production code
+ const handleClick = () => {
+ // `console.log` statements should generally be removed before production deployment to avoid exposing internal details and for performance reasons.
+ console.log('Button clicked');
+ setCount(count + 1);
+ };
+
+ // Missing return statement in some cases
+ const conditionalRender = condition => {
+ if (condition) {
+ return <div>Conditional content</div>;
+ }
+ // If `condition` is false, this function implicitly returns `undefined`, which React will render as nothing.
+ // Explicitly returning `null` is often clearer if no content is intended: `else { return null; }`.
+ };
+
+ // Using var instead of const/let
+ // `var` has function scope and can lead to unexpected behavior (hoisting, re-declaration).
+ // Always prefer `const` or `let` for block-scoped variables.
+ var oldStyleVariable = 'using var';
+
+ return (
+ <div style={inlineStyle}>
+ <h1>Any Page</h1>
+ <p>Count: {count}</p>
+ <button onClick={handleClick}>Increment</button>
+ {renderItems()}
+ {conditionalRender(true)}
+ <div id='some-element'></div>
+ </div>
+ );
}
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.