Coder Social home page Coder Social logo

react-redux-blog's Issues

i run: npm run dev: show message errror, please fix issue

ERROR in multi (webpack)-dev-server/client?http://localhost:8080 ./public/src/index.js
Module not found: Error: Can't resolve 'babel' in 'E:\Source Code Personal\ReactJS\react-redux-blog-master'
BREAKING CHANGE: It's no longer allowed to omit the '-loader' suffix when using loaders.
You need to specify 'babel-loader' instead of 'babel',
see https://webpack.js.org/guides/migrating/#automatic-loader-module-name-extension-removed
@ multi (webpack)-dev-server/client?http://localhost:8080 ./public/src/index.js

ROOT_URL constant

First of all, thank you for your great posts on Medium explaining Redux step by step! Really helped me understand the basics of Redux.

I was going through your code in this repo and saw the ROOT_URL constant a few times. I was wondering why you're checking wether the ROOT_URL includes localhost or not. What's the advantage of using relative paths when running the app on localhost?

This is not an issue but more a question in general :)

Question about return from signInUser action to dispatch in signInUserContainer

I'm obtaining a Promise from axios.post() in request on UserAction, that is asigned to payload attribute at return { type: SIGNIN_USER, payload: request }, but at dispatch I can't use this promise with .then(), Why you can do this? I had to do this:
let response = dispatch(signInUser(values)); response.payload.then();
What is the difference in your code?

If you are interested, I have posted a question in StackOverflow about it, but I haven't received answers.

Forgot Password Module

First things first - after downloading many react-redux starter projects and repos, your's has been by far the most comprehendible to me. Thanks very much. The fog is clearing.

It looks like the actions for the forgot password functionality that are referenced in /containers/ForgotPwdFormContainer...

import {forgotPwd, forgotPwdSuccess, forgotPwdFailure, resetUserFields } from '../actions/users';

... don't exist in the repo. Do they exist, but did not get pushed up to GH? If you did write them and wouldn't mind sharing them, it would be very much appreciated.

Thanks for sharing this great work

webpack doesn't find configuration

โžœ npm run dev

[email protected] dev /Users/tony/Projects/react-redux-blog
node ./node_modules/webpack-dev-server/bin/webpack-dev-server.js

Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.

  • configuration.resolve.extensions[0] should not be empty.
    -> A non-empty string

MongoDB link links to OS X guide

The "Install MongoDB" link actually links to the "Install on OS X":

https://docs.mongodb.org/manual/tutorial/install-mongodb-on-os-x/#install-mongodb-community-edition-with-homebrew

It should probably link here:

https://docs.mongodb.com/manual/installation/

Showing error on installing the dependencies

Hi rajaraodv, thanks for providing us a such as a nice app, which we can study and learn the redux app with mongodb support, I search the web but couldn't found a good example like this. i learned a lot from you, Please help me in this app.

i have downloaded the repo but when i try to install the dependencies, i got the following error. If you have some time, please take a look. thanks in advance

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\ch
okidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@
1.0.17: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"
})
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\
node_modules\npm\bin\npm-cli.js" "install"
npm ERR! node v7.4.0
npm ERR! npm v4.0.5
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the bcrypt package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs bcrypt
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls bcrypt
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! F:\react-redux-blog\npm-debug.log

Uncaught TypeError: dispatch(...).then is not a function

I got this error from public/src/containers/PostsListContainer.js and I think the reason is fetchPosts from public/src/actions/posts.js returns a regular js object instead of a Promise that is thenable. As a result I can't get the posts list to show. Anyone else had the same issue?

Router.js:130 Uncaught TypeError: _this.setState is not a function

For those who have this issue. it seems that react-router uses create-react-class, which will need to be aliased to the preact-compat version with webpack, browserify or babel, e.g:

// webpack.config.js
module.exports = {
// ...
    alias: {
        'react': 'preact-compat',
        'react-dom': 'preact-compat',
        'create-react-class': 'preact-compat/lib/create-react-class'
    }
}

Post Id

I can't for the life of me figure out how to get the post Id. Can someone show me line number where the post id is created or how it's created? I have a router setup that's similar to this project post/:id. I'm pretty sure the id isn't created on the postNew component. Maybe it's the redux form that creates it? Right now in my project the post leads to post/undefined on the postList component. I'm thinking maybe it's the postDetails component that actually does the state management to give the id. Right now when console.log(this.props) I'm getting the router props but the id is always undefined.

INITIAL_STATE loading prop

Hi. Should the INITIAL_STATE loading prop not be set to true and only set to false on either FETCH_POSTS_SUCCESS or FETCH_POST_FAILURE?

The loading prop currently is only set to true once the axios promise is resolved due to using the redux-promise middleware. If the initial value of loading is set to true then as soon as the request is initiated loading is true.

Just an observation.

Access another user by changing token from session storage

Step to reproduce :
Register with USER 1 ,
Login with USER 1
Copy Token from session storage from user1; Logout user 1

Register with a USER 2
Login with USER 2
Paste in session storage Token of user1 into user2 .
refresh a page you will observe User one dashboard again instead of User 2.

Same issue I am facing with JWT

renderField and onchange

How the onChange is handled in this example?

react-redux-blog/public/src/components/renderField.js

I am little bit confused here. My example I type anything in the text box doesnt appear.
Please help.

Token is always undefined?

Thank you for your sample app, this is a great learning resource for me. I'm currently trying to make use of your authentication middleware in the app.js file. However, whenever I run the application, create a user and log in with that user, at no time there is a token defined after this line:

var token = req.body.token || req.query.token || req.headers['x-access-token']; console.log('Token: ', token); // <--- always gives me 'Token: undefined'

The login process runs just as expected, the user gets created in mongo and everything looks fine, except for the empty token. It does not matter if I run the production version or the dev version on 8080, I also tried it with Firefox and Opera (on Linux).

Is this an error that is caused by my environment or can you confirm this behaviour? I have been fiddling around with this for some hours now, but it seems I'm too unexperienced with that for now.

Bestr regards,
Rob

Refreshing post gives 404 not found

Reproduce: Click demo link in the README, click on a post (I choose the first one), hit refresh.
Expected: To see the post
Actual: Not found

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.