npm.io
1.0.2 • Published 5 years ago

react-node-easy-crud

Licence
ISC
Version
1.0.2
Deps
3
Size
1.6 MB
Vulns
0
Weekly
0
Stars
1

react-node-easy-crud

react componets library to use with node-easy-crud to create easy curd application in MERN stack. you should use node-easy-crud on your backend to use this componets.

Installation

npm install react-node-easy-crud

add icons css to index.html of react project

<link
  rel="stylesheet"
  href="https://fonts.googleapis.com/icon?family=Material+Icons"
/>

Simple usage

<EasyCrudTable url="<node-easy-crud read endpoint>"></EasyCrudTable>
Example
import React from "react";
import "./App.css";
import EasyCrudTable from "react-easy-crud";

function App() {
  return (
    <div className="App">
      <EasyCrudTable
        url="http://localhost:5000/api/crud/Subject"
      ></EasyCrudTable>
    </div>
  );
}

export default App;
Headers

you can also pass custom headers using headers props

<EasyCrudTable
  url="http://localhost:5000/api/crud/Subject"
  headers={{ "auth-token": "AUTH_TOKEN","key":"value" }}
></EasyCrudTable>

SnapShots

Table with read data

Read Data Table

Edit Form

Edit form

Add Form

Add form

Delete Confirmation

Delete model

Keywords