All Questions
229
questions
1
vote
0
answers
72
views
how can I implement redux in server-side react?
I am trying to stuff the authentication info into the redux store so header can connect and get the info. I am using google oauth with passport.js.
//this is controller
exports.currentUser = (req, ...
1
vote
1
answer
859
views
My react-admin bundle size is huge (860KB)
I already tried to configure various different optimization methods, but my react-admin bundle size stays huge, at 860KB.
What can I do about it? Is it normal? What can be a possible cause? I will ...
1
vote
1
answer
2k
views
WebPack-React-TypeScript: loading CSS and exporting types
Question
I am building a UI components library to reuse in my projects. The library is written in TypeScript and .less with React, and built with WebPack.
.
├── README.md
├── dist
├── index.js
├── ...
0
votes
1
answer
402
views
Use custom middleware for async actions. Actions must be plain objects
I am new to this, and this error occurs, looked at a lot of solutions on it, nothing helped to fix.
Another mistake in store.js. When point to thunk.
Argument type ThunkMiddleware & {...
0
votes
1
answer
115
views
Why doesn't my function action get called?
I am trying to make a register user. In my component file there are the fields that fill the state and then on submit it should call the register function created in the action that afterwards should ...
2
votes
1
answer
47
views
React different homepage by environnement Best practices
I have a different homepage in all my environment. One for staging, one for development. The issue is in each environment, I need only 1 homepage and not the other one.
Actually I have a temporary ...
0
votes
0
answers
108
views
Launching node application's with webpack: error cross-env NODE_ENV=development node src
Fairly new to webdev and I want to run this person's code:
https://github.com/RaidVisat/template-ract-redux-orm-sqlz-ssr
Not familiar with webpack yet, and I've tried every route of npm install/...
1
vote
2
answers
544
views
Cannot Maintain Session on Page Refresh
I have an app built with Rails, React, and Webpacker. I'm using token based authentication, so when a user creates an account or signs in they are assigned a token in the DB. This token is then used ...
0
votes
1
answer
1k
views
Webpack for reactjs with axios working in production but not working in development mode
I build a crud a application with react and redux, my backend is django.
When i run npm run build and run django server, i see my crud application working great! no single issue with this..
But when ...
1
vote
1
answer
1k
views
TypeError: store.getState is not a function React-redux
I'm trying to make a login form and it requires me to migrate my soloreac app in react + redux app. I'm facing many errors and stuck with TypeError: store.getState is not a function. I'm a newbie in ...
2
votes
1
answer
2k
views
Failure to precompile assets for production - rails/webpacker/react/redux
I am new to web development and I've been working on this website using rails/webpacker/react/redux. I am trying to deploy a website on heroku but am unable to precompile assets for production. I am ...
1
vote
3
answers
1k
views
import/export according to environment variable
For a clientSide app I would like to select a specific import according to the environment variables that were setup in the package.json.
eg:`
if (process.env.IS_DEV)
import { store } from '...
0
votes
1
answer
468
views
Webpack resolve giving undefined for exported variables
I was using Webpack 4 for bundling files in my current project. In order to avoid long paths in import statement, I was using Resolve key of the webpack configuration.
Currently, my config is ...
0
votes
0
answers
178
views
Webpack 4 chunks size reducing
I'm splitting my build bundle on different chunks, but getting warnings about size limits, tried to find decision by myself, without results.
My current optimization config:
optimization: {
...
1
vote
0
answers
307
views
React Hot Loader: <Provider> does not support changing `store` on the fly
I just upgraded to the latest version of React, Webpack, Redux, Babel, etc.
React hot loading works, but there's an error from react-redux: <Provider> does not support changing `store` on the ...