score:4

you can use class components (as i usually do), just make sure that you add the static keyword to the getinitialprops method:

import react from 'react';
import proptypes from 'prop-types';

export default class gallery extends react.component {
    static proptypes = {
        image: proptypes.string
    };

    static getinitialprops() {
        return {...};
    }

    render() {
        return (
            <div>
                // render gallery
            </div>
        );
    }
}


Related Query

More Query from same tag