PART 12 - To-Do App - ['Symfony 5', 'React', Material UI'] - Material UI Snackbar

Поделиться
HTML-код
  • Опубликовано: 12 сен 2024
  • In this video series I'll be going over how to make a basic to-do app using React, Symfony and Material UI.
    In this episode we will look at Material UI Snackbars which basically is a notification pop-up. We can decide the location it renders as well as the color it will display in with an easy switch with react. There is also a Theme methods for this but because this app is so small there is no reason to and we'll just do it inline with conditional render boolean. Color will change based on the message level object we get back from symfony in the back-end through PHP.
    If you want to follow along with this series from start to finish I recommend using the playlist for this series: • To-Do App - ['Symfony ...
    Snackbar Docs:
    material-ui.co...
    Plugins▼
    plugins.jetbra...
    Video Links▼
    composer: getcomposer.or...
    Symfony: symfony.com/do...
    PHP: www.php.net/do...
    GIT:git-scm.com/do...
    SQL Workbench: dev.mysql.com/...
    JETBRAINS Student Program: www.jetbrains....
    Yarn: yarnpkg.com/en...
    My Links▼
    My website: sandercokart.com
    Instagram: / sandercokart
    @SanderCokart
    Twitter: / sandercokart
    @SanderCokart
    Join the Discord Community?
    / discord
    AND tell me me what you think of the video PERSONALLY!
    (If you want)
    FAQ▼
    1drv.ms/b/s!Al...
  • НаукаНаука

Комментарии • 13

  • @LeandroLuccerini
    @LeandroLuccerini 3 года назад +1

    On 5:00 about autoHideDuration, it simply calls the "onClose" function. So if you want the Snackbar to disappear, you have to add a function
    const onClose = () => {
    context.setMessage('');
    }
    and pass it to the "onClose" props of the Snackbar

    • @SanderCokart
      @SanderCokart  3 года назад

      Yeah figured that out. But I'm almost inclined to stop the synfony and continue on laravel cuz damn it's much better

  • @camilogonzalez9137
    @camilogonzalez9137 3 года назад +1

    don´t know why cannot implement Snackbar
    this is my error:
    Uncaught TypeError: prop_types__WEBPACK_IMPORTED_MODULE_4___default(...).shape is not a function
    at Object../node_modules/@material-ui/core/esm/Snackbar/Snackbar.js

    • @SanderCokart
      @SanderCokart  3 года назад +1

      Shape has been written wrong hehe. Wrong syntax for prop types

    • @SanderCokart
      @SanderCokart  3 года назад

      @@camilogonzalez9137 weird. Looks alright

    • @SanderCokart
      @SanderCokart  3 года назад

      You don't have proptypes npm installed?

    • @camilogonzalez9137
      @camilogonzalez9137 3 года назад

      @@SanderCokart many thanks i was struggling a lot with this. Nice videos Sander

  • @yassinerihani2760
    @yassinerihani2760 2 года назад

    Snackbar.js:254 Uncaught TypeError: prop_types__WEBPACK_IMPORTED_MODULE_12___default(...).shape is not a function !!

    • @SanderCokart
      @SanderCokart  2 года назад +1

      MyComponent.propTypes = {
      style: PropTypes.shape({
      color: PropTypes.string,
      fontSize: PropTypes.number
      }),
      }
      You must have written the proptypes syntax wrong

    • @yassinerihani2760
      @yassinerihani2760 2 года назад

      @@SanderCokart thanks

  • @hagsa
    @hagsa 4 года назад +1

    931 followers

    • @SanderCokart
      @SanderCokart  4 года назад +1

      Slowly progressing

    • @hagsa
      @hagsa 4 года назад

      @@SanderCokart be proud anyway hubs