parse-community/ParseReact là dự án mã nguồn mở trên GitHub, viết chủ yếu bằng JavaScript, với 1.3k sao. Seamlessly bring Parse data into your React applications.
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
WARNING ⚠️ - this project is not maintained, if you wish to maintain this project make yourself known ⚠️
Parse + React
Seamlessly bringing Parse data into your React applications.
NOTE: Parse + React only supports the Parse JS SDK up to version 1.6.14. Behavior with 1.7.* is unpredictable, and 1.8.* breaks functionality with the new LiveQueries feature.
As developers, we want to encourage patterns that integrate easily into both the server and the client, and are working on a new low-level SDK that works well with Redux and React Native. When that codebase is ready for production apps, we will publish a new recommended starter kit for apps built on Parse & React.
Overview
Parse + React is an interface layer on top of the
Parse JS SDK that provides simple access to
the Parse API from React. It lets React
components subscribe to Parse queries, and allows data mutations to be
dispatched in a Flux-style manner. In the background, these subscriptions are
managed in a way that lets these components automatically update as objects are
created and modified, allowing user interfaces to be snappy and responsive.
Full API
Example
To add Parse data to a component, it simply needs to subscribe to a standard
Parse Query. This is done through an implementation of the newly-proposed
observe() API for React. The
ParseReact Mixin allows a version of this new lifecycle method to be used today
with Parse Queries.
If you're using React with ES6 classes, we also provide a subclass of
React.Component that allows you to use the
observe() and Query-specific APIs.
var CommentBlock = React.createClass({
mixins: [ParseReact.Mixin], // Enable query subscriptions
observe: function() {
// Subscribe to all Comment objects, ordered by creation date
// The results will be available at this.data.comments
return {
comments: (new Parse.Query('Comment')).ascending('createdAt')
};
},
render: function() {
// Render the text of each comment as a list item
return (
<ul>
{this.data.comments.map(function(c) {
return <li>{c.text}</li>;
})}
</ul>
);
}
});
Whenever this component mounts, it will issue the query and the results will be
attached to this.data.comments. Each time the query is re-issued, or objects
are modified locally that match the query, it will update itself to reflect
these changes.
Mutations are dispatched in the manner of
Flux Actions, allowing updates to be
synchronized between many different components without requiring views to talk
to each other. All of the standard Parse data mutations are supported, and you
can read more about them in the Data Mutation guide.
// Create a new Comment object with some initial data
ParseReact.Mutation.Create('Comment', {
text: 'Parse <3 React'
}).dispatch();
Getting Started
Parse + React is available from our CDN
(minified), and
npm.
If you're not familiar with React, we recommend you first walk through their
tutorials before adding
Parse data to your React applications.
Parse + React adds new functionality when React and the Parse JS SDK are used
together, and it requires that those libraries be in place before it is
initialized. The easiest way to do this is to load them on your page before
loading the Parse + React library:
<html>
<head>
<script src="http://fb.me/react-0.13.3.min.js"></script>
<script src="https://www.parsecdn.com/js/parse-latest.js"></script>
<!-- Now include parse-react.js -->
<script src="https://www.parsecdn.com/js/parse-react.js"></script>
...
If you're using a tool like Webpack or Browserify to enable Common JS require
statements, you need to make sure you also include the 'parse' npm package
in your dependencies.
var React = require('react');
var Parse = require('parse');
var ParseReact = require('parse-react');
// ...
As of version 1.6, the Parse JS SDK has a different build for React Native.
If you're using Parse+React on React Native, you'll need to require the
'parse-react/react-native' package instead.
// For React Native apps
var React = require('react-native');
var Parse = require('parse/react-native');
var ParseReact = require('parse-react/react-native');
Now that you've included all of the necessary libraries, you're ready to start
subscribing to Parse data and
mutating it.
Contributing
See the CONTRIBUTING file for information on how to help out.
parse-community/ParseReact có 1.3k sao GitHub — tải lại trang để xem số mới nhất, hoặc xem trực tiếp github.com/parse-community/ParseReact. TopGit phản chiếu số sao của GitHub nhưng không cam kết đến từng phút.
parse-community/ParseReact có tag gì không?
Bản đồng bộ chưa ghi nhận topic GitHub nào cho parse-community/ParseReact. GitHub topics hiển thị ở thanh bên phải trang repo — đó là nơi đáng kiểm tra nhất.
parse-community/ParseReact còn đang phát triển không?
Commit gần nhất trên parse-community/ParseReact là 5.9 năm trước (theo timestamp GitHub). Repo có 203 fork — một chỉ báo về mức độ quan tâm của cộng đồng.
parse-community/ParseReact là gì?
parse-community/ParseReact (parse-community/ParseReact) là dự án JavaScript trên GitHub. Theo mô tả gốc: Seamlessly bring Parse data into your React applications.
parse-community/ParseReact viết bằng ngôn ngữ gì?
parse-community/ParseReact chủ yếu viết bằng JavaScript. Trường "language" của GitHub dựa trên phần lớn byte ở nhánh mặc định.
Đọc đầy đủ README ở tab phía trên.
Muốn nghe thêm một ý kiến về ParseReact?
Hỏi một AI đọc được trang này — một cú bấm là có ngay nhận định về ParseReact.