$30 off During Our Annual Pro Sale. View Details »

NotAKeynote

 NotAKeynote

My <React.NotAConf /> Keynote: 🤔😅⁇

http://react-not-a-conf.com/

Radoslav Stankov

April 28, 2018
Tweet

More Decks by Radoslav Stankov

Other Decks in Technology

Transcript

  1. !"??
    Radoslav Stankov 28/04/2018

    View Slide

  2. Radoslav Stankov
    @rstankov

    http://rstankov.com

    http://github.com/rstankov

    View Slide

  3. View Slide

  4. View Slide

  5. !"??

    View Slide

  6. !

    View Slide

  7. View Slide

  8. "BG"

    View Slide

  9. "BG".replace(/./g, c => String.fromCodePoint(c.charCodeAt(0) + 127397));

    View Slide

  10. "BG".replace(/./g, c => String.fromCodePoint(c.charCodeAt(0) + 127397)); === #

    View Slide

  11. "$" + "\u200D" + "❤" + "\u200D" + "&"

    View Slide

  12. "$" + "\u200D" + "❤" + "\u200D" + "&" === "'"

    View Slide

  13. "$" + "\u200D" + "❤" + "\u200D" + "&" === "'"
    ZWJ
    Zero Width Joiner

    View Slide

  14. "$" + "\u200D" + "("

    View Slide

  15. "$" + "\u200D" + "(" === ")"

    View Slide

  16. "$" + "*" + "\u200D" + "(" === "+"

    View Slide

  17. View Slide

  18. ...but I'm not going to talk about emojis today "

    View Slide


  19. View Slide

  20. View Slide

  21. "

    View Slide

  22. !"??
    ??

    View Slide

  23. ??

    View Slide

  24. View Slide

  25. View Slide

  26. View Slide

  27. View Slide

  28. View Slide

  29. View Slide

  30. View Slide

  31. , JavaScript Fatigue

    View Slide

  32. View Slide

  33. What framework to use?
    How to manage state?
    How to fetch data?
    Which router to use?
    Which calendar component to use?
    Which chart component to use?

    ...
    !

    View Slide

  34. Medium
    easy

    to change
    Big
    Medium
    Small
    Medium
    Small
    Small
    Small
    Small Small
    hard
    to change
    simple complex
    * totally unscientific chart -

    View Slide

  35. Medium
    easy

    to change
    Big
    Medium
    Small
    Medium
    Small
    Small
    Small
    Small Small
    hard
    to change
    simple complex
    * totally unscientific chart -

    View Slide

  36. What framework to use?
    How to manage state?
    How to fetch data?
    Which router to use?
    Which calendar component to use?
    Which chart component to use?

    ...
    !

    View Slide

  37. What framework to use?
    How to manage state?
    How to fetch data?
    Which router to use?
    Which calendar component to use?
    Which chart component to use?

    ...
    !

    View Slide

  38. What ecosystem to choose?
    How to manage state?
    How to fetch data?
    Which router to use?
    Which calendar component use?
    Which chart component use?

    ...
    !

    View Slide

  39. What ecosystem to choose?
    How to manage state?
    How to fetch data?
    Which router to use?
    Which calendar component use?
    Which chart component use?

    ...
    !

    View Slide

  40. View Slide

  41. History of JS Ecosystem

    View Slide

  42. History of JS Ecosystem
    2005

    View Slide

  43. History of JS Ecosystem
    2005 2006

    View Slide

  44. History of JS Ecosystem
    2005 2010
    2006

    View Slide

  45. History of JS Ecosystem
    2005 2010
    2006

    View Slide

  46. History of JS Ecosystem
    2005 2013
    2010
    2006

    View Slide

  47. History of JS Ecosystem
    2005 2018
    2013
    2010
    2006

    View Slide

  48. What ecosystem to choose?
    How to manage state?
    How to fetch data?
    Which router to use?
    Which calendar component use?
    Which chart component use?

    ...
    !

    View Slide

  49. View Slide

  50. View Slide

  51. What ecosystem to choose?
    How to manage state?
    How to fetch data?
    Which router to use?
    Which calendar component use?
    Which chart component use?

    ...
    !

    View Slide

  52. Medium
    easy

    to change
    Big
    Medium
    Small
    Medium
    Small
    Small
    Small
    Small Small
    hard
    to change
    simple complex
    * totally unscientific chart -

    View Slide

  53. View Slide

  54. History of React Ecosystem
    2013 2018

    View Slide

  55. History of React Ecosystem
    2013 2018
    2014

    View Slide

  56. History of React Ecosystem
    2013 2018
    2014 2015

    View Slide

  57. History of React Ecosystem
    2013 2018
    2014 2015

    View Slide

  58. History of React Ecosystem
    2013 2018
    2014 2015 2016

    View Slide

  59. History of React Ecosystem
    2013 2018
    2014 2015 2016
    Concepts

    View Slide

  60. History of React Ecosystem
    2013 2018
    2014 2015 2016
    Libraries

    View Slide

  61. History of React Ecosystem
    2013 2018
    2014 2015 2016

    View Slide

  62. View Slide

  63. View Slide

  64. What ecosystem to choose?
    How to manage state?
    How to fetch data?
    Which router to use?
    Which calendar component use?
    Which chart component use?

    ...
    !

    View Slide

  65. Medium
    easy

    to change
    Big
    Medium
    Small
    Medium
    Small
    Small
    Small
    Small Small
    hard
    to change
    simple complex
    * totally unscientific chart -

    View Slide

  66. ...imagine starting a new project .

    View Slide

  67. View Slide

  68. View Slide

  69. View Slide

  70. View Slide

  71. View Slide

  72. Who is developer worst enemy?

    View Slide

  73. / The designer
    Who is developer worst enemy?

    View Slide

  74. / The designer
    0 The QA
    Who is developer worst enemy?

    View Slide

  75. / The designer
    0 The QA
    1 The sys admin
    Who is developer worst enemy?

    View Slide

  76. / The designer
    0 The QA
    1 The sys admin
    2 The project owner
    Who is developer worst enemy?

    View Slide

  77. / The designer
    0 The QA
    1 The sys admin
    2 The project owner
    3 Santa
    Who is developer worst enemy?

    View Slide

  78. / The designer
    0 The QA
    1 The sys admin
    2 The project owner
    3 Santa
    4 Code coupling
    Who is developer worst enemy?

    View Slide

  79. / The designer
    0 The QA
    1 The sys admin
    2 The project owner
    3 Santa
    4 Code coupling
    Who is developer worst enemy?

    View Slide

  80. 4 Code coupling

    View Slide

  81. // pages/Home/index.js
    import * as React from 'react';
    import { Jumbotron } from 'react-bootstrap';
    import { Link } from 'react-router';
    import moment from 'moment';
    import styles from './styles.css';
    import globalStyles from 'styles/global.css';
    import classNames from 'classNames';
    import FancyTime from 'fancy-time'
    export default class Page extends React.Component {
    state = {
    time: new Date(),
    };
    componentDidMount() {
    this.interval = setInterval(this.updateTime, 1000);
    }
    componentWillUnmount() {
    clearInterval(this.interval);
    this.interval = null;
    }
    updateTime = () => {
    this.setState({ time: new Date() });
    }
    render() {
    const { time } = this.state.time;
    return (

    Conference

    View Slide

  82. export default class Page extends React.Component {
    state = {
    time: new Date(),
    };
    componentDidMount() {
    this.interval = setInterval(this.updateTime, 1000);
    }
    componentWillUnmount() {
    clearInterval(this.interval);
    this.interval = null;
    }
    updateTime = () => {
    this.setState({ time: new Date() });
    }
    render() {
    const { time } = this.state.time;
    return (

    Conference

    className={className(styles.clock, globalStyles.time)}
    datetime={moment(time).format()}>
    {moment(time).format('HH:mm')}

    Schedule
    Venue


    );
    }
    }

    View Slide

  83. Reasons for change

    View Slide

  84. Component
    Dependency Dependency Dependency

    View Slide

  85. Component
    Dependency Dependency Dependency
    Component Component
    Dependency Dependency

    View Slide

  86. Component
    Component Component
    Dependency
    nent Comp
    Dependency
    Dependency
    Dependency Dependency Dependency Dependency Dep
    cy

    View Slide

  87. Control changes

    View Slide

  88. Component
    Dependency Dependency

    View Slide

  89. Component
    Dependency Dependency
    Component

    View Slide

  90. Component
    Dependency Dependency
    Component
    Component Component

    View Slide

  91. Time
    Moment FancyTime
    Page
    Page Page

    View Slide

  92. export default class Page extends React.Component {
    state = {
    time: new Date(),
    };
    componentDidMount() {
    this.interval = setInterval(this.updateTime, 1000);
    }
    componentWillUnmount() {
    clearInterval(this.interval);
    this.interval = null;
    }
    updateTime = () => {
    this.setState({ time: new Date() });
    }
    render() {
    const { time } = this.state.time;
    return (

    Conference

    className={className(styles.clock, globalStyles.time)}
    datetime={moment(time).format()}>
    {moment(time).format('HH:mm')}

    Schedule
    Venue


    );
    }
    }

    View Slide

  93. export default class Page extends React.Component {
    state = {
    time: new Date(),
    };
    componentDidMount() {
    this.interval = setInterval(this.updateTime, 1000);
    }
    componentWillUnmount() {
    clearInterval(this.interval);
    this.interval = null;
    }
    updateTime = () => {
    this.setState({ time: new Date() });
    }
    render() {
    const { time } = this.state.time;
    return (

    Conference


    Schedule
    Venue


    );
    }
    }

    View Slide

  94. // components/Time/index.js
    import * as React from 'react';
    import classNames from 'classNames';
    import styles from './styles.css';
    import moment from 'moment';
    import FancyTime from 'fancy-time';
    export default function Time({ className, time }) {
    return (
    className={className(styles.time, className)}
    datetime={moment(time).format()}>
    {moment(time).format('HH:mm')}

    );
    }

    View Slide

  95. Time
    Moment FancyTime
    Page
    Page Page

    View Slide

  96. Time
    Utils FancyTime
    Page
    Page Page
    Moment

    View Slide

  97. // components/Time/index.js
    import * as React from 'react';
    import classNames from 'classNames';
    import styles from './styles.css';
    import { formatTime } from './utils';
    import FancyTime from 'fancy-time';
    export default function Time({ className, time }) {
    return (
    className={className(styles.time, className)}
    datetime={formatTime('full'}>
    {formatTime('clock')}

    );
    }
    // components/Time/utils.js
    import moment from 'moment';
    const FORMATS = {
    'full': null,
    'clock': 'HH:mm',
    };
    export function formatTime(time, kind) {
    const format = FORMATS[kind]
    return moment(time).format(format);
    }

    View Slide

  98. // pages/Home/index.js
    import * as React from 'react';
    import { Jumbotron } from 'react-bootstrap';
    import { Link } from 'react-router';
    import styles from './styles.css';
    import globalStyles from 'styles/global.css';
    import classNames from 'classNames';

    import Time from 'components/Time';
    export default class Page extends React.Component {
    state = {
    time: new Date(),
    };
    componentDidMount() {
    this.interval = setInterval(this.updateTime, 1000);
    }
    componentWillUnmount() {
    clearInterval(this.interval);
    this.interval = null;
    }
    updateTime = () => {
    this.setState({ time: new Date() });
    }
    render() {
    const { time } = this.state.time;
    return (

    Conference

    View Slide

  99. // pages/Home/index.js
    import * as React from 'react';
    import { Jumbotron } from 'react-bootstrap';
    import { Link } from 'react-router';
    import styles from './styles.css';
    import globalStyles from 'styles/global.css';
    import classNames from 'classNames';
    import Time from 'components/Time';
    import Clock from 'components/Clock';
    export default class Page extends React.Component {
    render() {
    return (

    Conference


    {(time) => }

    Schedule
    Venue


    );
    }
    }

    View Slide

  100. // pages/Home/index.js
    import * as React from 'react';
    import { Jumbotron } from 'react-bootstrap';
    import { Link } from 'react-router';
    import styles from './styles.css';
    import globalStyles from 'styles/global.css';
    import classNames from 'classNames';
    import Time from 'components/Time';
    import Clock from 'components/Clock';
    export default class Page extends React.Component {
    render() {
    return (

    Conference


    {(time) => }

    Schedule
    Venue


    );
    }
    }

    View Slide

  101. // pages/Home/index.js
    import * as React from 'react';
    import { Link } from 'react-router';
    import Time from 'components/Time';
    import Clock from 'components/Clock';
    import Jumbotron from 'components/Jumbotron';
    export default function Page() {
    return (


    {(time) => }

    Schedule
    Venue

    );
    }

    View Slide

  102. // paths.js
    export default {
    schedule() {
    return '/schedule';
    },
    venue() {
    return '/venue';
    }
    };

    View Slide

  103. // pages/Home/index.js
    import * as React from 'react';
    import { Link } from 'react-router';
    import paths from 'paths';
    import Time from 'components/Time';
    import Clock from 'components/Clock';
    import Jumbotron from 'components/Jumbotron';
    export default function Page() {
    return (


    {(time) => }

    Schedule
    Venue

    );
    }

    View Slide

  104. // pages/Home/index.js
    import * as React from 'react';
    import { Link } from 'react-router';
    import paths from 'paths';
    import Time from 'components/Time';
    import Clock from 'components/Clock';
    import Jumbotron from 'components/Jumbotron';
    export default function Page() {
    return (


    {(time) => }

    Schedule
    Venue

    );
    }

    View Slide

  105. // components/Link/index.js
    import { Link } from 'react-router';
    export default function Link({ to, className, children }) {
    return (
    {children}
    );
    }

    View Slide

  106. // components/Link/index.js
    import { Link } from 'found';
    export default function Link({ to, className, children }) {
    return (
    {children}
    );
    }

    View Slide

  107. View Slide

  108. View Slide

  109. "

    View Slide

  110. View Slide

  111. View Slide

  112. Thanks 5

    View Slide