Questions tagged [react-server]

36 questions
1
vote
1 answer

Unexpected token syntax error I can not see

Thanks for taking a look. This is the syntax error I am getting: [0] /Users/alexkarasik/Documents/server/services/passport.js:26 [0] async (accessToken, refreshToken, profile, done) => { [0] ^ [0] SyntaxError: Unexpected token ( and this is…
kalex
  • 15
  • 7
1
vote
1 answer

Adding TypeScript definitions for wrapped classes

I'm using a package called react-server that can take any class and will add methods to it at runtime. It expects to have the class that it wraps to have an interface like interface { getElements(): Array } and it will add…
ashays
  • 1,154
  • 1
  • 12
  • 30
1
vote
0 answers

Best way to improve React Server Side Rendering by avoiding NODE_ENV checks

I am using require('babel-register') to allow for ES6 in node.js and doing server-side rendering of my react components. In this talk (start around 7:14) https://youtu.be/PnpfGy7q96U?t=7m14s one main recommendation to speed up React Server Side…
Ish
  • 1,855
  • 5
  • 24
  • 32
1
vote
1 answer

ReactJS + ServerSide with ExpressJS - need a way to dictate what to load on the server vs client

So I'm working on POC app, that needs to have SEO optimized content(=== rendered on the server). But within the same route there might be a dynamic data coming from different sources and it might take a while to capture all that data. This dynamic…
eloleon
  • 1,144
  • 2
  • 10
  • 18
1
vote
1 answer

Difference between React Server and React Client

I have been researching react.js framework for quite a bit. I am yet to fully understand the difference between client side and server side rendering (despite effort searching for CLEAR difference). Thus, I would highly appreciate for kind souls to…
oatcrunch
  • 443
  • 9
  • 18
0
votes
0 answers

NextJs 13.4.4 fails to load when "server action" and middelware are present

I have a "use client" form with a "server side" action function. Whe the middlewear is acting upon the route of that form, the app fails to render with this error. Client side Form. page.jsx "use client" import { Container, Avatar, …
0
votes
1 answer

Why ReactDOMServer.renderToString not returning raw HTML

I write a simple example to test ReactDOMServer.renderToString like this:
0
votes
0 answers

React: code only works when the development server has disconnected

I was coding a simple todolist, adding an add event to it. The logic seems no problem, but it doesn't work and only worked when having the error: the development server has disconnected Below is my code: componentDidMount() { this.addEvent =…
Hai Na Zheng
  • 167
  • 3
  • 11
0
votes
1 answer

react web dev server not detecting changes to sass files live

My react app was created with npx create-react-app and is not loading the changes on the local server for changes made in the styles folder. here is the git repo , https://github.com/saulvg1/bottega-final
Saul Vega
  • 47
  • 1
  • 2
  • 7
0
votes
1 answer

Sprockets::FileNotFound at / couldn't find file 'react-server' with type 'application/javascript'

I'm returning to a website that I made about a year and a half ago, and when spinning up the rails server, I get this error: Sprockets::FileNotFound at / couldn't find file 'react-server' with type 'application/javascript' Checked in these paths:…
0
votes
1 answer

String Template in React JSX

I created a server and inserted some data in it, Now when I want to refer to that data, it's not displaying the name field, I used string templates to read the name field from the server and show it, but it's not working, is there something wrong…
Mona
  • 47
  • 11
0
votes
1 answer

Prerender React app as static HTML

I have an interactive landing page (single page - no react router). This landing page will need to be uploaded to a CMS where you just paste in the HTML - meaning I do not need tags and the JavaScript file is uploaded…
user2929830
0
votes
1 answer

Error: no such file or directory in React Server Side Rendering

I trying to do server side rendering on my existing react project but having problem. I think the problem is memory-fs is unable to find file or directory. I have read many threads but no luck as of yet. Below is the…
codeGig
  • 1,024
  • 1
  • 8
  • 11
0
votes
0 answers

React DOM not updating after the browser/react server stopped supporting a component

Overnight, my originally working react service was disabled. The reason that it happens is my browser or react server stopped supporting this react component "react-selectize". React-selectize is a react component build on "react-select" and provide…
Xiaojun Yu
  • 31
  • 1
  • 6
0
votes
1 answer

Load server data of react-table on button click

I am trying to display a react-table with server side pagination and it's working fine. Issue is that the react-table loads data from server during the page load itself but I am trying to load the data in react-table only when user clicks a link on…
Jiten
  • 153
  • 1
  • 3
  • 9