ericderegt / pursuit Goto Github PK
View Code? Open in Web Editor NEWWDI Final Project application
WDI Final Project application
Morning Neel! I have a couple questions on React. I was having trouble getting my Backbone collection working over the weekend. Second, when I get json data back from my api, I'm having trouble accessing anything that's nested. Lastly, I'm getting some warnings related to unmounting/mounting components. Please let me know when you have a few minutes to chat.
When I submit on line 81 of app/assets/javascripts/components/CreateCourse.js.jsx, I try to package all of the data into an object to send in my ajax call. for some reason it only passes the chapters array and not the course array into the call to the server (line 37-52). I'm not sure why I can't fix this!
Hey Neel,
I have a question on when you need to need mixins on backbone+react. Here's a chunk of the code from the react ToDoMVC that uses it and I've seen it elsewhere. Thanks!
// An example generic Mixin that you can add to any component that should react
// to changes in a Backbone component. The use cases we've identified thus far
// are for Collections -- since they trigger a change event whenever any of
// their constituent items are changed there's no need to reconcile for regular
// models. One caveat: this relies on getBackboneModels() to always return the
// same model instances throughout the lifecycle of the component. If you're
// using this mixin correctly (it should be near the top of your component
// hierarchy) this should not be an issue.
var BackboneMixin = {
componentDidMount: function() {
// Whenever there may be a change in the Backbone data, trigger a reconcile.
this.getBackboneModels().forEach(function(model) {
model.on('add change remove', this.forceUpdate.bind(this, null), this);
}, this);
},
componentWillUnmount: function() {
// Ensure that we clean up any dangling references when the component is
// destroyed.
this.getBackboneModels().forEach(function(model) {
model.off(null, null, this);
}, this);
}
};
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.