DEV Community 👩‍💻👨‍💻

Joney Spark
Joney Spark

Posted on

how to push a array element in a single array object in react.js ? Help Plz

let {postDetail} = useParams();
    const url = `${postDetail}`;
    const [details, setDetails] = useState([]);
        .then(res => res.json())
        .then(data => {
            setDetails(data => [, {"image":`${}`}]);


Top comments (0)

16 Libraries You Should Know as a React Developer

Being a modern React developer is not about knowing just React itself. To stay competitive, it is highly recommended to explore the whole ecosystem. This article contains some of the most useful React component libraries to speed up your developer workflow.