Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

useState intro

import { useState } from 'react';

const Post = () => {
    const [likesCount, setLikesCount] = useState(0);

    return (
        <section>
            <p>What is the number of likes we should display? {likesCount}</p>
        </section>
    );
};

export default Post;
Source by learn-2.galvanize.com #
 
PREVIOUS NEXT
Tagged: #useState #intro
ADD COMMENT
Topic
Name
4+8 =