git clone https://github.com/notrab/create-react-app-redux.git
cd create-react-app-redux
yarn
yarn start
This boilerplate is built using create-react-app so you will want to read the User Guide for more goodies.
React Router, Redux, Redux Thunk & Create React App boilerplate
License: MIT License
git clone https://github.com/notrab/create-react-app-redux.git
cd create-react-app-redux
yarn
yarn start
This boilerplate is built using create-react-app so you will want to read the User Guide for more goodies.
Dockerfile can help other developers easily create an image of your application. I have noticed that there is Dockerfile missing from the codebase, So could you please assign me to create Dockerfile for this application.
{
"private": true,
"homepage": "https://create-react-app-redux.now.sh",
"scripts": {
"deploy": "now && now alias",
"start": "react-scripts start",
"now-start": "serve -s ./build",
"build": "react-scripts build",
"test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject",
"precommit": "pretty-quick --staged"
},
"devDependencies": {
"prettier": "1.16.4",
"react-scripts": "2.1.8"
},
"dependencies": {
"connected-react-router": "6.3.1",
"react": "16.8.4",
"react-dom": "16.8.4",
"react-redux": "6.0.1",
"react-router": "4.3.1",
"react-router-dom": "4.3.1",
"redux": "4.0.1",
"redux-thunk": "2.3.0",
"sanitize.css": "8.0.0",
"serve": "10.1.2",
"history": "latest"
},
"browserslist": [
">0.2%",
"not dead",
"not ie <= 11",
"not op_mini all"
]
}
Hi! Any idea how can i remove routing, so http://server/mycustomfolder/index.html would work? I tried to
Any idea appreciated
How to set server side rendering for this app?
Migrating from v4 to v5 (v6) is breaking app.
Here is FAQ with instruction how to migrate:
https://github.com/supasate/connected-react-router/blob/master/FAQ.md#how-to-migrate-from-v4-to-v5
Add prop-types
dependency and update necessary components to declare the PropTypes.
Hello -
I like the setup of your project a lot and found your Medium post very useful, so thanks!
When I clone this repo and start it, I am having the issue from the title:
"TypeError: Cannot read property 'type' of undefined"
when I click the "Go to about page via redux".
Based on this commit on cyberid41's fork, they seem to have the issue too.
Some googling led me to this issue on the react-router-redux page, where it was indicated there might be a problem with the ordering of the middleware, but it looks right to me (thunk first).
Anyway, you obviously don't owe me anything but I figured you might want to know and if you do happen to have a solution I'd love to see it :). Also, I'm very new to open source and github, so apologies if this is an incorrect or inappropriate way to file an issue. Thanks for reading!
I'm looking for this index.js: https://github.com/johnkmzhou/cordova-create-react-app/blob/master/src/index.js
It seems there is not a single line in the whole create-react-app-redux generated project containing something that suggests the existence of a serviceWorker. Even after ejecting the project.
What gives? Is it wrapped into some third party component or something?
Thanks a lot.
Hi - I am unable to deploy my react application to production.
I can run the app locally with no problems. I then run:
npm run build
Push the bundled code to my server and configure nginx
server {
listen 80;
server_name *;
#access_log /var/logs/nginx/nginx_access.log;
#error_log /var/logs/nginx/nginx_error.log;
root /var/www/;
index index.html;
# Any route that doesn't have a file extension (e.g. /devices)
location / {
try_files $uri $uri/ /index.html;
}
}
I can see the plaintext in my browser when I run the application (via docker), the static files load, but they do not render correctly.
Here is an example of an image import:
<img class="waiting_icon" src="./static/media/waiting.da817564.svg" alt="logo">
Nothing shows, same with css
styling.
Any suggestions - thanks.
Update:
I am importing the css in /src/index.js
like so:
import React from 'react';
import { render } from 'react-dom';
import { Provider } from 'react-redux';
import { ConnectedRouter } from 'connected-react-router';
import store, { history } from './store';
import App from './containers/app';
import './index.css';
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
These updates have all been created already. Click a checkbox below to force a retry/rebase of any.
These are blocked by an existing closed PR and will not be recreated unless you click a checkbox below.
react
, react-dom
)react-router
, react-router-dom
)package.json
connected-react-router 4.5.0
react 16.14.0
react-dom 16.14.0
react-redux 5.1.2
react-router 4.4.0-beta.8
react-router-dom 4.4.0-beta.8
redux 4.2.1
redux-thunk 2.4.1
sanitize.css 11.0.1
serve 10.1.2
prettier 2.7.1
react-scripts 2.1.8
It is possible helping me developing a auth system recurring to a fake api for the moment like
https://reqres.in/
where i have the login auth with redux
and then a midleware to check if route is logged in or not
i would like an implementation of this from a pro
thanks in advance
carlos vieira
If after pressing Async button, you press the regular button before async timer has finished, it will toggle enable the async button, and once the timer has finished it will be disabled again.
There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.
Error type: undefined. Note: this is a nested preset so please contact the preset author if you are unable to fix it yourself.
Hi, Jamie..
could you please help me on why I can't make an http: request on my reducers?
here's my reducer code:
import axios from 'axios';
const LOAD = 'post/LOAD';
const LOAD_SUCCESS = 'post/LOAD_SUCCESS';
const LOAD_FAIL = 'post/LOAD_FAIL';
const initialState = {
loaded: false,
data: null
};
export default function reducer(state = initialState, action = {}) {
switch (action.type) {
case LOAD:
console.log('loading');
return {
...state,
loading: true
};
case LOAD_SUCCESS:
console.log('success');
return {
...state,
loading: false,
loaded: true,
data: action.payload,
error: null
};
case LOAD_FAIL:
console.log('fail');
return {
...state,
loading: false,
loaded: false,
data: null,
error: action.payload
};
default:
return state;
}
}
export function load() {
return (dispatch) => {
axios.get(`https://jsonplaceholder.typicode.com/posts`)
.then( res => {
dispatch({
type: "LOAD_SUCCESS",
payload: res.data
})
})
.catch(err=>{
dispatch({
type: "LOAD_FAIL",
payload: err.response
})
});
dispatch({
type: "LOAD"
})
}
}
and here's my store.js:
import { createStore, applyMiddleware } from 'redux';
import { routerMiddleware } from 'react-router-redux';
import thunk from 'redux-thunk';
import createHistory from 'history/createBrowserHistory';
import rootReducer from './reducers';
export const history = createHistory();
const initialState = {};
const middleware = [thunk, routerMiddleware(history),
];
const store = createStore(
rootReducer,
initialState,
applyMiddleware(...middleware)
);
export default store;
Hi There,
I am using your app, and I have an issue for HTTP request with the axios. I don't know why it doesn't work. I used it before with my other applications.
Can you help me, please?
Here is some code
export function getUsers() { return function (dispatch) { dispatch(Action.startLoadingSuccess()); GET(
/api/v1/accounts/user`).then(response => {
if(response && response.data) dispatch(Action.getUserSuccess(response));
}).catch(err => { console.log('error is: ', err);
if (err.response && err.response.data) toastr.error('', err.response.data.message, toastrOption);
else {if(err.message) toastr.error('', err.message, toastrOption);}
});
};
}`
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.