Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

394
Views
React Client-/Server-Side Rendering Security Issue, Hide/Protect Route

i got a question about the rendering behaviour of react. Please correct me if I'm wrong, im new to React and Web Development.

Afaik the default rendering of a react SPA happens on the client side, right?

So this means the whole JSX code in the src directory will be downloaded on the first visit of the page (see image of the Chrome WebDeveloper Tools Source Tab), right?

Let's assume i would develop an admin area where only authorized users should have access to, e.g. through JWT, the JS-Code still contains information about the admin area, even if it's not rendered, a guy with the corresponding knowledge could get access to the area because all information about the admin area is already downloaded to the client computer, right?

Sure i can protect sensitive data through the api and JWT Token, but what about if i don't want the client to know about the admin area content? Is there a best practice for some kind of this case, e.g. a mix of client-side (default user content) and server-side (admin area content) rendering? What would be the best way to do this? What are the advantages and disatvantages of client-/ or server-side rendering?

Thank you && please be kind, as already mentioned i'm knew to React and WebDev && sorry for my english, i try to improve it continuously.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Afaik the default rendering of a react SPA happens on the client side, right?

Not necessarily. It depends on how you set up the project.

So this means the whole JSX code in the src directory will be downloaded on the first visit of the page

Not necessarily. e.g. see Webpack code splitting.

Sure i can protect sensitive data through the api and JWT Token, but what about if i don't want the client to know about the admin area content?

Don't put the content in the app. Keep it in the data that is protected by your JWT.

Or make your customer facing application and your admin application different apps in the first place.

What are the advantages and disatvantages of client-/ or server-side rendering?

Server-side rendering is faster on initial load, works when JS fails, and is better food for search engines.

Client-side rendering is faster on subsequent page loads.

It's not really a factor in security.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!