Code Monkey home page Code Monkey logo

Comments (6)

arunoda avatar arunoda commented on July 17, 2024

Can we some sample code? May be a sample repo.

Otherwise it's hard to tell what going on here.
On 2016 ජන 19, අඟහ at පෙ.ව. 4.54 Brandon Mikeska [email protected]
wrote:

I can't for the life of me get the actions to pass through to the
components The context comes through just fine but when checking the props
the actions are always null Any advice on what to check to see why that is
happening?


Reply to this email directly or view it on GitHub
#16.

from mantra-sample-blog-app.

brandonmikeska avatar brandonmikeska commented on July 17, 2024

Here ya go: https://github.com/brandonmikeska/mantra-example

from mantra-sample-blog-app.

arunoda avatar arunoda commented on July 17, 2024

See here: https://github.com/brandonmikeska/mantra-example/blob/master/client/containers/login.js#L15
You mapped sendVerificationCode as login in the composer.

But in the component you've used it as sendVerificationCode, but it should be login.
See: https://github.com/brandonmikeska/mantra-example/blob/master/client/components/authentication/login.jsx#L6

from mantra-sample-blog-app.

brandonmikeska avatar brandonmikeska commented on July 17, 2024

Hmm so I fixed it but yet the props are still empty.

from mantra-sample-blog-app.

adamdawkins avatar adamdawkins commented on July 17, 2024

Hey @brandonmikeska I was looking for login examples with Mantra and I think I've found your problem.

In routes.jsx you need to import Login from the container not the component.

See https://github.com/brandonmikeska/mantra-example/blob/master/client/configs/routes.jsx#L7

I think it needs to be:

import Login from '../containers/login.js';

I then get a userObject error in the actions, but this.props is no longer empty.

In essence at the moment the router is going straight to the component and bypassing all of your container code.

from mantra-sample-blog-app.

brandonmikeska avatar brandonmikeska commented on July 17, 2024

Thanks @adamdawkins!!!!

from mantra-sample-blog-app.

Related Issues (20)

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.