All Projects → janryWang → React Propers

janryWang / React Propers

Select react doms , and update props.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to React Propers

Cash
An absurdly small jQuery alternative for modern browsers.
Stars: ✭ 5,714 (+14185%)
Mutual labels:  selector, dom
Swiftsoup
SwiftSoup: Pure Swift HTML Parser, with best of DOM, CSS, and jquery (Supports Linux, iOS, Mac, tvOS, watchOS)
Stars: ✭ 3,079 (+7597.5%)
Mutual labels:  selector, dom
Domtastic
Small, fast, and modular DOM and event library for modern browsers.
Stars: ✭ 763 (+1807.5%)
Mutual labels:  selector, dom
Cheerio
Fast, flexible, and lean implementation of core jQuery designed specifically for the server.
Stars: ✭ 24,616 (+61440%)
Mutual labels:  selector, dom
Layui dropdown
基于layui框架的下拉控件,支持菜单下拉,自定义下拉内容,兼容表格。
Stars: ✭ 40 (+0%)
Mutual labels:  selector, dom
Iconswitch
🍭 Custom Android Switch widget
Stars: ✭ 874 (+2085%)
Mutual labels:  selector
Charming
😎 Lettering.js in vanilla JavaScript
Stars: ✭ 954 (+2285%)
Mutual labels:  dom
Dompurify
DOMPurify - a DOM-only, super-fast, uber-tolerant XSS sanitizer for HTML, MathML and SVG. DOMPurify works with a secure default, but offers a lot of configurability and hooks. Demo:
Stars: ✭ 8,177 (+20342.5%)
Mutual labels:  dom
Html Map Element
Proposed spec for dynamic slippy maps in HTML: https://maps4html.github.io/HTML-Map-Element/spec/
Stars: ✭ 8 (-80%)
Mutual labels:  dom
Rwidgethelper
Android UI 快速开发,专治原生控件各种不服
Stars: ✭ 996 (+2390%)
Mutual labels:  selector
Dom99
Extend html with directives
Stars: ✭ 37 (-7.5%)
Mutual labels:  dom
Radi
🌀Tiny (in size) front-end framework with no extra browser re-flows
Stars: ✭ 946 (+2265%)
Mutual labels:  dom
Redux Tide
Simple library for redux crud normalized state and actions/selectors for it
Stars: ✭ 20 (-50%)
Mutual labels:  selector
Javascript Steppitguide
JavaScript-StepPitGuide《JavaScript踩坑指南》- 说前端简单的什么的最变态了!
Stars: ✭ 30 (-25%)
Mutual labels:  dom
Waff Query
Lightweight DOM manager
Stars: ✭ 9 (-77.5%)
Mutual labels:  dom
Onthefly
🔗 Generate TinySVG, HTML and CSS on the fly
Stars: ✭ 37 (-7.5%)
Mutual labels:  dom
Html React Parser
📝 HTML to React parser.
Stars: ✭ 846 (+2015%)
Mutual labels:  dom
Multicaptchabot
The best bot for collecting cryptocurrency from freebitco.in, freedoge.co.in and freenem.com 🚀🌔
Stars: ✭ 27 (-32.5%)
Mutual labels:  dom
Cosha
Colorful shadows for your images. 🎨
Stars: ✭ 988 (+2370%)
Mutual labels:  dom
Preact
⚛️ Fast 3kB React alternative with the same modern API. Components & Virtual DOM.
Stars: ✭ 30,527 (+76217.5%)
Mutual labels:  dom

react-propers

Select react doms , and update props.

Usage

import React from "react"
import ReactDOM from "react-dom"
import Propers from "react-propers"

ReactDOM.render(
   <Propers traverse={(props,{key})=>{
       switch(key){
           case "aaa":
             return {
                 className:"aaa"
             }
           case "bbb":
             return {
                 className:"bbb"
             }
           case "ccc":
             return {
                 className:"ccc"
             }
           case "ddd":
             return false
       }
       return props
   }}>
      {React=>(
       <>
         <div id="aaa">111</div>
         <div id="bbb">222</div>
         <div id="ccc">333</div>
         <div id="ddd">444</div>
       </>
      )}
   </Propers>
)

//out put

<div id="aaa" class="aaa">111</div><div id="bbb" class="bbb">222</div><div id="ccc" class="ccc">333</div>

Install

npm install --save react-propers

API

selector : String | Array<String>

Support single selector and multi selector.

traverse : Function

You can use qverse to easily update props.

LICENSE

The MIT License (MIT)

Copyright (c) 2018 JanryWang

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

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