Imagine youβre building a React app.
How do you decide between these two options:
1. Traditional SPA
2. React Server Components (RSC)
SPA benefits:
β Proven and mature.
β Lets us use more of the React ecosystem of third party libraries.
β Simple. Easy to understand.
β Cheaper and easier to host.
RSC benefits:
β Likely renders the first page faster.
β Likely saves bandwidth (each RSC adds zero K to bundle).
β Use heavy libraries solely on the server to save bandwidth
β Requires less code for data fetching (may even call the DB directly instead of hitting an API).
Given these tradeoffs, if we already have a REST/GraphQL API, or we want cheap, simple hosting, I lean toward SPA.
If we donβt have a web API, or performance is critical, I lean toward RSC.
How do you decide between these two options:
1. Traditional SPA
2. React Server Components (RSC)
SPA benefits:
β Proven and mature.
β Lets us use more of the React ecosystem of third party libraries.
β Simple. Easy to understand.
β Cheaper and easier to host.
RSC benefits:
β Likely renders the first page faster.
β Likely saves bandwidth (each RSC adds zero K to bundle).
β Use heavy libraries solely on the server to save bandwidth
β Requires less code for data fetching (may even call the DB directly instead of hitting an API).
Given these tradeoffs, if we already have a REST/GraphQL API, or we want cheap, simple hosting, I lean toward SPA.
If we donβt have a web API, or performance is critical, I lean toward RSC.
π2
10 Reliable websites for finding remote jobs that pay in USD salaries.
1. wellfound. com
2. remote. com
3. freelancer. in
4. flexjobs. com
5. remoteok. com
6. justremote. co
7. himalayas. app
8. tryremotely. com
9. workingnomads. com
10. Weworkremotely. com
@javascript_resources
1. wellfound. com
2. remote. com
3. freelancer. in
4. flexjobs. com
5. remoteok. com
6. justremote. co
7. himalayas. app
8. tryremotely. com
9. workingnomads. com
10. Weworkremotely. com
@javascript_resources
π2π1
Coding is not meant for the weak
It's meant for one with passion
It's meant for one who can endure failures
It's meant for one who feels he/she doesn't understand any programming language and wants to dig deep.
It's meant for one who can deal with bugs
It's meant for you.
#motivation
@javascript_resources
It's meant for one with passion
It's meant for one who can endure failures
It's meant for one who feels he/she doesn't understand any programming language and wants to dig deep.
It's meant for one who can deal with bugs
It's meant for you.
#motivation
@javascript_resources
β€4
If I had to start learning web development in 2024, I would follow this flow:
π HTML
π¨ CSS styling and layout
π‘ JavaScript fundamentals
βοΈ Document Object Model (DOM)
π¦ Git and GitHub
π§° Command Line
πΌοΈ Responsive Web Design
π― JavaScript functions
π Front-end frameworks (React, Angular, or Vue)
π AJAX and data fetching
π Form handling and validation
π Asynchronous JavaScript (Promises, async/await)
π Working with JSON
ποΈ Backend development
βοΈ Server-Side Rendering
ποΈ Databases (SQL and NoSQL)
π Web security and best practices
π§ API Integration
π Hosting and deployment
π SEO
π§ Test Driven Development
π§© Content Management Systems
πΌ Build websites
@javascript_resources
π HTML
π¨ CSS styling and layout
π‘ JavaScript fundamentals
βοΈ Document Object Model (DOM)
π¦ Git and GitHub
π§° Command Line
πΌοΈ Responsive Web Design
π― JavaScript functions
π Front-end frameworks (React, Angular, or Vue)
π AJAX and data fetching
π Form handling and validation
π Asynchronous JavaScript (Promises, async/await)
π Working with JSON
ποΈ Backend development
βοΈ Server-Side Rendering
ποΈ Databases (SQL and NoSQL)
π Web security and best practices
π§ API Integration
π Hosting and deployment
π SEO
π§ Test Driven Development
π§© Content Management Systems
πΌ Build websites
@javascript_resources
β€1
React Interview Question's Answer
What is JSX, and how does it differ from regular JavaScript and HTML?
- What is JSX?
JSX (JavaScript XML) is a syntax extension for JavaScript, often associated with React, a popular JavaScript library for building user interfaces.
JSX allows you to write HTML-like code within your JavaScript files, making it easier to define and render UI components in a more declarative way.
- Differences from Regular JavaScript:
1. Mixing HTML and JavaScript:
In JSX, you can seamlessly mix HTML-like elements with JavaScript expressions.
This allows you to dynamically generate content based on data or component state.
In regular JavaScript, you'd need to concatenate strings or use other methods to achieve the same result, which can be more cumbersome.
2. Component Rendering:
JSX is closely tied to React components.
You define the structure of your UI using JSX elements, and React takes care of rendering these components into the DOM.
In contrast, regular JavaScript doesn't provide a built-in way to create reusable UI components.
What is JSX, and how does it differ from regular JavaScript and HTML?
- What is JSX?
JSX (JavaScript XML) is a syntax extension for JavaScript, often associated with React, a popular JavaScript library for building user interfaces.
JSX allows you to write HTML-like code within your JavaScript files, making it easier to define and render UI components in a more declarative way.
- Differences from Regular JavaScript:
1. Mixing HTML and JavaScript:
In JSX, you can seamlessly mix HTML-like elements with JavaScript expressions.
This allows you to dynamically generate content based on data or component state.
In regular JavaScript, you'd need to concatenate strings or use other methods to achieve the same result, which can be more cumbersome.
2. Component Rendering:
JSX is closely tied to React components.
You define the structure of your UI using JSX elements, and React takes care of rendering these components into the DOM.
In contrast, regular JavaScript doesn't provide a built-in way to create reusable UI components.
This is how to deal with imposter Syndrome π
-Acknowledge achievements: Recognize success.
-Positive affirmations: Boost confidence
-Seek support: Share feelings
Realistic goals: Break tasks down.
-Celebrate progress: Acknowledge victories
-Continuous learning: Embrace growth.
#motivation
@javascript_resources
-Acknowledge achievements: Recognize success.
-Positive affirmations: Boost confidence
-Seek support: Share feelings
Realistic goals: Break tasks down.
-Celebrate progress: Acknowledge victories
-Continuous learning: Embrace growth.
#motivation
@javascript_resources
5 Commonly Used Units of Measurement in CSS:
1. Pixels (px)
2. Percentages (%)
3. Rem
4. Em
5. Viewport units (vw, vh)
@javascript_resources
1. Pixels (px)
2. Percentages (%)
3. Rem
4. Em
5. Viewport units (vw, vh)
@javascript_resources
π3
MERN Stack Developer Roadmap 2024:
Step 1: π Master Web Basics
Step 2: π₯ HTML/CSS Proficiency
Step 3: β¨ Deep Dive into JavaScript
Step 4: π Version Control with Git
Step 5: π Node.js for Server-Side
Step 6: π Express.js for Routing
Step 7: π¦ NPM for Package Management
Step 8: π MongoDB for Databases
Step 9: π React.js for Frontend
Step 10: π Implement Security (JWT)
Step 11: π App Deployment (Heroku, Netlify)
Step 12: π³ Docker Basics
Step 13: βοΈ Explore Cloud Services
Step 14: π CI/CD with GitHub Actions
Step 15: π§ͺ Testing with Jest
Step 16: π API Documentation
Step 17: π’ Build a Portfolio
Step 18: πΌ Resume Crafting
Step 19: π Interview Preparation
Step 20: π Job Hunting Strategy
Step 1: π Master Web Basics
Step 2: π₯ HTML/CSS Proficiency
Step 3: β¨ Deep Dive into JavaScript
Step 4: π Version Control with Git
Step 5: π Node.js for Server-Side
Step 6: π Express.js for Routing
Step 7: π¦ NPM for Package Management
Step 8: π MongoDB for Databases
Step 9: π React.js for Frontend
Step 10: π Implement Security (JWT)
Step 11: π App Deployment (Heroku, Netlify)
Step 12: π³ Docker Basics
Step 13: βοΈ Explore Cloud Services
Step 14: π CI/CD with GitHub Actions
Step 15: π§ͺ Testing with Jest
Step 16: π API Documentation
Step 17: π’ Build a Portfolio
Step 18: πΌ Resume Crafting
Step 19: π Interview Preparation
Step 20: π Job Hunting Strategy
π₯5π2
β‘οΈparseInt()
and
β‘οΈNumber()
both converts string to number however there is a big difference between both
β‘οΈ parseInt() reads the string from left to right & stops parsing when it encounters a non-numeric character.
It returns the numeric value parsed up to that point.
example: parseInt("19abc") -> returns 19
β‘οΈNumber() is more strict.
If the string contains any non-numeric characters (except for whitespace), it returns NaN
example: Number(123abc) -> returns NaN
β‘οΈAlso if string is in float then Number() will return float number but parseInt() will only return integer.
example:
parseInt("6.9") -> returns 6 only
Number("18.5") -> returns 18.5
This makes a big impact especially when you are handling data that can have string values as well attached to the number.
In that case use parseInt() other wise use Number().
@javascript_resources #javascript
and
β‘οΈNumber()
both converts string to number however there is a big difference between both
β‘οΈ parseInt() reads the string from left to right & stops parsing when it encounters a non-numeric character.
It returns the numeric value parsed up to that point.
example: parseInt("19abc") -> returns 19
β‘οΈNumber() is more strict.
If the string contains any non-numeric characters (except for whitespace), it returns NaN
example: Number(123abc) -> returns NaN
β‘οΈAlso if string is in float then Number() will return float number but parseInt() will only return integer.
example:
parseInt("6.9") -> returns 6 only
Number("18.5") -> returns 18.5
This makes a big impact especially when you are handling data that can have string values as well attached to the number.
In that case use parseInt() other wise use Number().
@javascript_resources #javascript