Giter Club home page Giter Club logo

getting-started-with-react-old's Introduction

The Meteor Chef
#015 - Getting Started with React

In this recipe, we'll learn how to get started with the React user interface library. We'll refactor Base, the starter kit used here at The Meteor Chef, replacing Blaze with React. We'll learn how to define components, handle routing with Flow Router, and get a feel for React's basic API and how to get data into our applications.

Read on The Meteor Chef

Demo the Recipe

Download the Source

The code for this recipe is licensed under the MIT License.

getting-started-with-react-old's People

Contributors

mbrookes avatar peterchauyeg avatar rglover avatar themeteorchef avatar zentuit avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

getting-started-with-react-old's Issues

Validation on login

Hi,

I would like to show validation messages on the form fields directly rather than using Bert if the username cannot be found or the password is incorrect. I have the following code, which works perfectly, but I would like to know if this the best/correct way or if I can use the jQuery validate plugin instead.

Meteor.loginWithPassword( email, password, ( error ) => {
  if ( error ) {
    if(error.reason === 'Incorrect password') {
      $('input[name="password"]').attr('class', 'error');
      $('<label class="error">' + error.reason + '</label>').appendTo('label[for="password"]');
    }

    if(error.reason === 'User not found') {
      $('input[name="emailAddress"]').attr('class', 'error');
      $('<label class="error">' + error.reason + '</label>').appendTo('label[for="emailAddress"]');
    }

  } else {
    Bert.alert( 'Logged in!', 'success' );
  }
});

Many thanks.

_checkIfUserExists not needed in generate-people.js

Hi,

I might be missing something obvious as I'm still pretty new to this but...
I don't think the _checkIfUserExists function in the generate-people module is needed because I can't see it being called anywhere.
I'm guessing this is just a copy error from the generate-accounts module?

Thanks for writing your awesome tutorials, I'm loving Meteor and wouldn't be making the progress I am without your help! ๐Ÿ‘

Error on logout

Exception in delivering result of invoking 'logout': TypeError: callback is not a function
    at http://localhost:3000/packages/accounts-base.js?7dabd814506e384c709f8bf707377955f9814129:495:23
    at null._callback (http://localhost:3000/packages/meteor.js?9730f4ff059088b3f7f14c0672d155218a1802d4:999:22)
    at _.extend._maybeInvokeCallback (http://localhost:3000/packages/ddp-client.js?82da06d8e1ea6342d823b2c5c3be071e96108c70:3508:12)
    at _.extend.receiveResult (http://localhost:3000/packages/ddp-client.js?82da06d8e1ea6342d823b2c5c3be071e96108c70:3528:10)
    at _.extend._livedata_result (http://localhost:3000/packages/ddp-client.js?82da06d8e1ea6342d823b2c5c3be071e96108c70:4639:9)
    at onMessage (http://localhost:3000/packages/ddp-client.js?82da06d8e1ea6342d823b2c5c3be071e96108c70:3373:12)
    at http://localhost:3000/packages/ddp-client.js?82da06d8e1ea6342d823b2c5c3be071e96108c70:2742:11
    at Array.forEach (native)
    at Function._.each._.forEach (http://localhost:3000/packages/underscore.js?fa590de5090ceb4a42555b48562fd8f8e7035758:157:11)
    at self.socket.onmessage (http://localhost:3000/packages/ddp-client.js?82da06d8e1ea6342d823b2c5c3be071e96108c70:2741:11)

Which is odd, as according to the Meteor docs, a callback is optional, but it thinks it's getting a non-function callback despite none being specified.

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.