Skip to content

Remove jQuery from tutorial #603

@Daniel15

Description

@Daniel15

This may be controversial, but after browsing StackOverflow I believe there's way too many people that load jQuery when they really don't need it. Let's not add to that. I don't think we should be loading jQuery in the tutorial just to do an AJAX request. Let's instead have a dummy object that just returns a static list.

var CommentsService = {
  data: [...hardcoded data here...],
  getAll: function(callback) { callback(this.data); }
  // ...
};

Which could simply be replaced to implement AJAX loading.


Old post (before I thought of just using static data):
Let's replace it with standard XMLHttpRequest code and say something like "Here's some simple code for doing an AJAX request, alternatively you could use your favourite framework like jQuery, MooTools, YUI, ... instead". Having jQuery loaded in the tutorial may make people think that jQuery is necessary to use React.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions