GitXplorerGitXplorer
m

ignore-props

public
1 stars
0 forks
0 issues

Commits

List of commits on branch master.
Unverified
149c41f33441c15f403eb2ea30a5c4f4af452633

Add example/bundle.js to the git-ignore-file

committed 9 years ago
Unverified
e4b61f641055a6ff7e2957eb253aea1bc6ae082b

Update crappy readme-file

committed 9 years ago
Unverified
b7813848e406fc096a1089178711f0ec5b066e89

Bump to 1.0.1 becuase npm is a bitch

committed 9 years ago
Unverified
6205d998d99bc7174162025c5e8a7f381a801899

Add the first build

committed 9 years ago
Unverified
3e54c1ac04a3f4ad689d782feac0199091381a90

Finish the first version

committed 9 years ago
Unverified
2b87f020d1e87d3a9807eaa1ff3154faabb6d4db

Initial commit

MMrBoolean committed 9 years ago

README

The README file for this repository.

ignore-props

A tiny library which gives you the possibility to remove all the unnecessary props.

Install

npm i --save ignore-props

Usage

import React from 'react';
import { render } from 'react-dom';
import ignoreProps from 'ignore-props';
import NewsPost from 'path/to/component';

class SomeComponent {
  getClassNames() {
    // ...
  }

  render() {
    const { id } = this.props;

    return (
      <NewsPost
        newsId={ id }
        { ...ignoreProps(this.props, 'id') }
      />
    );
  }
}

render(
  <SomeComponent
    id={ 1 }
    style={ { backgroundColor: 'red' } }
  />,
  document.getElementById('somewhere')
);

License

The MIT License (MIT)

Copyright (c) 2016 Marc Binder marcandrebinder@gmail.com

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.