All Projects → Vitaminvp → react-patterns

Vitaminvp / react-patterns

Licence: other
react patterns examples

Programming Languages

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

Projects that are alternatives of or similar to react-patterns

react-combine-contexts
🚀Use multiple React Contexts without pain.
Stars: ✭ 23 (-41.03%)
Mutual labels:  context, hoc, render-props
React Fns
Browser API's turned into declarative React components and HoC's
Stars: ✭ 3,734 (+9474.36%)
Mutual labels:  hoc, render-props
React Wasm
Declarative WebAssembly instantiation for React
Stars: ✭ 349 (+794.87%)
Mutual labels:  hoc, render-props
React Nprogress
⌛️ A React primitive for building slim progress bars.
Stars: ✭ 173 (+343.59%)
Mutual labels:  hoc, render-props
Flagged
Feature Flags for React made easy with hooks, HOC and Render Props
Stars: ✭ 97 (+148.72%)
Mutual labels:  hoc, render-props
Escape From Callback Mountain
Example Project & Guide for mastering Promises in Node/JavaScript. Feat. proposed 'Functional River' pattern
Stars: ✭ 249 (+538.46%)
Mutual labels:  patterns, hoc
react-portal-hoc
A stupid HOC to make a stupid portal so you can make stupid modals
Stars: ✭ 14 (-64.1%)
Mutual labels:  hoc
SignatureVerificationDemo
Android 使用jni校验应用签名sha1值,防止so文件逆向盗用
Stars: ✭ 111 (+184.62%)
Mutual labels:  context
react-sheltr
Shared element transition helper components for React
Stars: ✭ 33 (-15.38%)
Mutual labels:  render-props
database
Simple and easy go database micro framework
Stars: ✭ 12 (-69.23%)
Mutual labels:  context
newrelic-context
Contains different helpers to make life easier with NewRelic and Context.
Stars: ✭ 21 (-46.15%)
Mutual labels:  context
ctxutil
utils for Go context
Stars: ✭ 18 (-53.85%)
Mutual labels:  context
go-grpc-bidirectional-streaming-example
gRPC bidirectional streaming example written in golang
Stars: ✭ 83 (+112.82%)
Mutual labels:  context
ktx
简化Android开发的Kotlin库
Stars: ✭ 39 (+0%)
Mutual labels:  context
addhoc
Handy little helper to create proper React HOC functions complete with hoisted statics and forwarded refs
Stars: ✭ 40 (+2.56%)
Mutual labels:  hoc
react-native-google-autocomplete
A react-native component with render props around the Google Autocomplete Api
Stars: ✭ 103 (+164.1%)
Mutual labels:  render-props
react-wisteria
Managing the State with the Golden Path
Stars: ✭ 18 (-53.85%)
Mutual labels:  context
hoc-element-table
📦 A Vue 3.x Table Component built on Webpack 5
Stars: ✭ 26 (-33.33%)
Mutual labels:  hoc
react-multi-context
Manage multiple React 16 contexts with a single component.
Stars: ✭ 19 (-51.28%)
Mutual labels:  context
mini-create-react-context
(A smaller) polyfill for the react context API
Stars: ✭ 34 (-12.82%)
Mutual labels:  context

react-patterns 😺

Kottans report

(still in the process of writing)

Preview link

Presentation

В репозитории собраны примеры некоторых паттернов для работы с библиотекой React. Вся информация взяты из просторов Интернета. Некоторые паттерны, на мой взляд, являются противоречивыми и приведены только с ознакомительной целью.

Для примера взята кнопка switch которая последовательно реализуется с применением разных подходов и усложнением логики работы.

Примеры кода находятся в папке src\examples пронумерованны и предполагают последовательное ознакомление т.к. последующие примеры могут содержать предыдущие паттерны.

Create with create-react-app

To start:

npm install or yarn install

npm start or yarn start

Open http://localhost:3000 to view it in the browser.

React Patterns

  • Default component
  • Compound components
  • React context
  • Render Props
  • Props Collections
  • Prop Getters
  • State Initializers
  • State Reducers
  • Control Props
  • Provider Pattern
  • Higher Order Components

Bonuses

  • Reusable Styles
  • State Reducers (with change types)
  • Proxy component
  • Controlled Components (submit form)
  • Uncontrolled Components (submit form)

screenShot

Links:

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].