All Projects → monster1935 → cnode-react-app

monster1935 / cnode-react-app

Licence: other
基于react的仿cnode社区项目

Programming Languages

javascript
184084 projects - #8 most used programming language
CSS
56736 projects
HTML
75241 projects

Projects that are alternatives of or similar to cnode-react-app

ReactCnodeJS
☀️React 初/中级项目,CnodeJS社区重构 (a junior project, rewrite cnodejs.org ) 🌟 DEMO:
Stars: ✭ 66 (+288.24%)
Mutual labels:  react-router, cnode
cnode-react
a web app for cnode.org with react + react-router + react-redux
Stars: ✭ 23 (+35.29%)
Mutual labels:  react-router, cnode
reactnest-boilerplate
🗼A starter project template with (Ngnix, ReactJS, Redux, Redux Thunk, React Router, NestJS, TypeORM, PostgreSQL, Docker, PM2) + (Code Style, Conventional Changelog with Commitlint, Husky, Git CZ)
Stars: ✭ 85 (+400%)
Mutual labels:  react-router
gavinanthony.com
gavinanthony.com
Stars: ✭ 34 (+100%)
Mutual labels:  react-router
awesome-remix
No description or website provided.
Stars: ✭ 263 (+1447.06%)
Mutual labels:  react-router
mern-stack-application
A MERN stack e-commerce website.
Stars: ✭ 45 (+164.71%)
Mutual labels:  react-router
reactube-client
A clone Youtube Web Player using React Provider Pattern, React Context and Typescript
Stars: ✭ 92 (+441.18%)
Mutual labels:  react-router
react-workshop
Practical Introduction to React (with Redux & React Router v4)
Stars: ✭ 17 (+0%)
Mutual labels:  react-router
use-react-router-breadcrumbs
tiny, flexible, hook for rendering route breadcrumbs with react-router v6
Stars: ✭ 170 (+900%)
Mutual labels:  react-router
async-react-router
Client side react router with async. It like next.js!
Stars: ✭ 21 (+23.53%)
Mutual labels:  react-router
react-mobile-starter
🌈 A starter project structure for React.js app using Dva.
Stars: ✭ 46 (+170.59%)
Mutual labels:  react-router
firefox-health-dashboard
firefox-health-dashboard.netlify.com
Stars: ✭ 26 (+52.94%)
Mutual labels:  react-router
ai web RISKOUT BTS
국방 리스크 관리 플랫폼 (🏅 국방부장관상/Minister of National Defense Award)
Stars: ✭ 18 (+5.88%)
Mutual labels:  react-router
gorecipe
Aplikasi web serderhana untuk mencari resep masakan khas indonesia yang dibuat menggunakan ReactJS.
Stars: ✭ 20 (+17.65%)
Mutual labels:  react-router
generator-react-impression
Yeoman generator for React project.
Stars: ✭ 19 (+11.76%)
Mutual labels:  react-router
react-micro-blog
🛠🛠🛠 A Simple Front-end React Application which Acts as a Complete Blog 🛠🛠🛠
Stars: ✭ 28 (+64.71%)
Mutual labels:  react-router
Google-Clone
A Google Clone which built with ReactJS. When you click Gmail button, you will be directed to my other project, Gmail Clone. You can search whatever you want and send realtime emails by clicking Gmail button!
Stars: ✭ 37 (+117.65%)
Mutual labels:  react-router
vaktija.ba
Web Site
Stars: ✭ 19 (+11.76%)
Mutual labels:  react-router
React-Native-Showcase
Best List of Open Source / Examples / Free / Case Study & Featured Template React Native Apps
Stars: ✭ 39 (+129.41%)
Mutual labels:  react-router
rekit-portal
Web UI for managing a Rekit project.
Stars: ✭ 90 (+429.41%)
Mutual labels:  react-router

cnode-react-app

一个学习 reactjs 的 demo,基于 CNode 社区提供的 API,以 react 组件化的开发思路,练习了基于 react 技术栈为主的前端单页面开发方式。

项目预览

Demo

在线预览,戳我

技术栈

TODOLIST

  • 首页组件化展示
  • 基于文章类型的前端路由添加
  • 基于文章详情的前端路由添加
  • 文章详情页的展示
  • 文章评论的显示

npm scripts

## 本地调试
yarn start

## 打包

yarn run build

## 发布至github repository gh-pages分支,使用该功能需要yarn add gh-pages,
## 并在package.json中配置网站的路径,如该示例中的homepage字段

yarn run deploy

总结

第一次尝试使用 react 进行前端单页面开发,之前曾经用 vue 写过一个 CNode.js 的一个应用 vue-cnode。与 vue 都是 MVVM 框架,但是在react的开发中还是有一些地方存在不同,目前尚未进行深入研究及实践。在这个小项目中感受最深的有以下几点:

  • 组件的写法

react 中导出的是一个含有jsx语法的类, vue 的开发中组件一般以vue的单文件组件写法,导出一个对象。

  • 关于路由的使用

react 中使用 react-router 进行前端路由的管理,同样含有 HashRouter 以及 BrowserRouter。其中 BrowserRouter 需要托管静态主页的服务器配合进行配置。

  • 属性的写法

react 中 jsx 语法中给 html 绑定属性值,部分属性名称发生变化,如 class 需要写成 className, for 需要写成 htmlFor,内联样式 style 属性需要使用驼峰的写法等。

  • 组件之间的通信

目前仅仅实践了父子组件的通信,通过 props 传参。至于非父子组件之间的通信如何来实现,尚未涉及,redux 以及 react-redux 在该项目中并未得到体现。

另外该仿 CNode.js 社区的 react 项目,仅仅通过部分API完成了首页以及文章详情页的一些展示,添加了 react 的前端路由,目的在于体会 react 技术栈的开发方式,尚不足以谈最佳实践。

写在最后

感谢 CNode 社区的提供的 API,一个有温度的社区。

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].