Giter Club home page Giter Club logo

create-react-app-redux's Introduction

create-react-app-redux's People

Contributors

01abhay avatar dependabot[bot] avatar micahstubbs avatar notrab avatar renovate-bot avatar renovate[bot] avatar tte avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

create-react-app-redux's Issues

Dockerfile missing

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.

Error: Could not find router reducer in state tree, it must be mounted under "router"

{
  "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"
  ]
}

Add prop-types

Add prop-types dependency and update necessary components to declare the PropTypes.

"TypeError: Cannot read property 'type' of undefined" when clicking "Go to about page via redux"

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!

Heroku routing issue

Hey man, thanks for a really good app and architecture but here the biggie:

if you load the app on Heroku > go to about page refresh the page, it will throw an error.
screen shot 2018-08-17 at 2 19 12 am

Deploying to production with nginx

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';

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Ignored or Blocked

These are blocked by an existing closed PR and will not be recreated unless you click a checkbox below.

Detected dependencies

npm
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

  • Check this box to trigger a request for Renovate to run again on this repository

Authentication module

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

Async Counter buttons

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.

Action Required: Fix Renovate Configuration

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.

please help, how to make an http request on load function?

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;

Dispatch with Axios doesn't work

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);}
});
};

}`

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.