TinyForest system front-end written with ReactJS
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

24 lines
378 B

import React from 'react';
const Fetchjson = () => {
const fetchPlant = () =>{
fetch('../plantinfo.json')
.then(r => r.json())
.then(rData => console.log(rData))
}
return (
<div>
<button fetchPlant={fetchPlant}>
Fetch
</button>
</div>
);
};
export default Fetchjson;