eBay / nice-modal-react

A modal state manager for React.
https://ebay.github.io/nice-modal-react
MIT License
1.96k stars 109 forks source link

Can the show method intelligently prompts those parameters? #152

Open george-es opened 3 months ago

george-es commented 3 months ago

We create and register a pop -up window

type MProps = {
    name: string,
    age: number,
};

const M = NiceModal.create<MProps>(({ name, age }) => (
    <div>
        {name}-{age}
    </div>
));
NiceModal.register('M_MODAL', M);

When using it, you cannot intelligently indicate the parameters you need to pass

NiceModal.show('M_MODAL', {});