text stringlengths 0 1.36k |
|---|
[1474.48 --> 1475.92] And Webpack for that matter. |
[1475.92 --> 1477.56] Well, yeah. |
[1477.56 --> 1482.32] It's included in the suggested React world set of tools. |
[1483.20 --> 1485.24] Then you can use Create React App. |
[1485.32 --> 1489.84] And the idea is that you can say, create React App to do. |
[1489.84 --> 1496.26] And then you have a React app for to do's that automatically compiles your ES6. |
[1496.26 --> 1509.46] has a way to do CSS in JavaScript and does error handling and building and all sorts of the different things that you would normally have to set up manually one by one. |
[1509.60 --> 1511.88] All is this one big kind of package. |
[1511.98 --> 1513.86] It's kind of a template to get started with a project. |
[1513.86 --> 1517.12] But one thing that is important. |
[1517.34 --> 1518.30] And the history is interesting. |
[1518.46 --> 1523.28] It was like a hack weekend project because React was one of. |
[1523.52 --> 1530.56] A lot of the feedback React got was that there's no kind of baseline of guaranteed supported tools that work together. |
[1530.96 --> 1534.34] And this is kind of like an answer to say like, well, this stuff all works together. |
[1536.24 --> 1539.34] So it was kind of like a hackathon one day thing. |
[1539.42 --> 1543.18] And then it's grown up a lot since then. |
[1543.18 --> 1545.18] And this is the 1.0 release. |
[1545.54 --> 1548.84] So it's been in use by a lot of people already. |
[1549.92 --> 1551.88] But now it's gone 1.0. |
[1552.18 --> 1556.24] And so the idea is you have to stay within there. |
[1558.40 --> 1560.44] So even like it configures your ESLint. |
[1560.52 --> 1561.46] It configures your Webpack. |
[1561.54 --> 1562.70] It configures your CSS. |
[1562.96 --> 1564.12] It configures your Babel. |
[1564.50 --> 1565.42] All those different things. |
[1565.86 --> 1571.94] And that configuration is even hidden from you because if you change it, then it's hard for them to make the assumptions that they can make. |
[1571.94 --> 1580.64] And so you can either choose to use Create React app as this thing that you can constantly update because you're staying within the coloring lines. |
[1580.64 --> 1584.54] Or you can use Create React app to like generate a thing. |
[1584.54 --> 1587.36] And then you can do what they call ejecting. |
[1587.56 --> 1590.84] And so you can eject from Create React app as soon as you create your app. |
[1591.00 --> 1595.98] It'll pull all that configuration into kind of your core directory or where it would go if you wrote it yourself. |
[1596.26 --> 1598.34] And then you can just edit it and all that stuff. |
[1598.34 --> 1605.56] But you can no longer kind of pull updates from Create React app in order to like get automatic updates if that kind of makes sense. |
[1607.58 --> 1609.96] So does that make sense as kind of a background? |
[1611.38 --> 1612.70] Makes sense to me. |
[1613.16 --> 1613.38] Cool. |
[1613.38 --> 1626.38] So like in general, I found that like with the things at work that are difficult to like do, if I want to do a Create React app, I have to eject pretty fast. |
[1627.84 --> 1632.44] Because we need to change one ESLint thing in order to work with our build servers. |
[1632.70 --> 1633.62] And it's like, oh, that kind of stinks. |
[1634.16 --> 1636.06] And that's like part of the deal. |
[1636.20 --> 1638.48] It's like if you can't do it, then you just don't get the updates. |
[1638.48 --> 1641.28] And sometimes that is not a problem. |
[1641.40 --> 1650.30] In general, like I haven't kind of missed, I haven't like paid enough attention to Create React app to get mad when they have an update and my thing can update with them. |
[1650.64 --> 1657.96] But this release would be maybe a good example of something that's like, well, if you stayed in the coloring lines, this would be a really nifty change. |
[1658.20 --> 1661.92] So we can go through the changes in 1.0 if you all want. |
[1662.46 --> 1663.00] Sure, sure. |
[1663.00 --> 1671.92] My first question is that it says something on the order of like, okay, you can use import and export semantics now without actually compiling down to CommonJS. |
[1672.14 --> 1673.68] But it's compiling down to something, right? |
[1673.80 --> 1674.68] Just to get into the browser. |
[1674.86 --> 1677.12] It's not relying on the browser's support yet. |
[1677.82 --> 1678.70] So it could. |
[1679.50 --> 1684.08] So the idea is, this is, I think you skipped ahead. |
[1684.56 --> 1689.34] Webpack 2 is a part of Create React app now. |
[1689.48 --> 1691.02] So it used to be based on Webpack 1. |
[1691.02 --> 1698.08] When most people are on Webpack 1, Webpack 2 is pretty new and it's a pretty, it's a larger departure than a lot of 2.0s would be. |
[1698.20 --> 1701.70] And so it's going to take some work to get people moved over. |
[1701.80 --> 1713.06] But one of the features of Webpack 2 is that it supports imports and exports natively, like at all, as part of its parser. |
[1713.06 --> 1723.24] And so before, if you gave Webpack 2 imports and exports ES6 modules and you weren't using Babel, nothing would happen. |
[1723.40 --> 1726.42] Like it would break because it wouldn't understand that. |
[1726.52 --> 1734.80] So what the steps would be, it would be compile with Babel to, you know, require statements and then pass it to Webpack. |
[1734.80 --> 1735.98] Oh, okay. |
[1735.98 --> 1738.08] And then Webpack could understand the require statements. |
[1738.48 --> 1747.82] But there are some features in ES6 modules like static analysis and stuff like that that are more guaranteed in ES6 modules. |
[1747.94 --> 1754.30] So they were able to say like, all right, we no longer care if you pass this require or these things. |
[1754.30 --> 1762.26] And so you may skip the Babel step in order to pass imports and exports rather than first compiling down to Webpack. |
[1762.38 --> 1774.34] And then it can use like the proper static analysis that is guaranteed as part of ES6 modules in order to do better things with regards to bundle size and tree shaking and dynamic loading and all that kind of stuff. |
[1774.34 --> 1788.40] And so it's more of a what does Webpack understand rather than you still may or you still more than likely at the end will compile it down to require statements that like from whatever library in order to to bundle it all together. |
[1788.48 --> 1789.98] It's like part of what Webpack does. |
[1790.18 --> 1792.92] But it natively understands imports and exports now. |
[1792.92 --> 1822.10] And that is now included automatically in Create React App, which means that if you were coloring in the lines before, all you have to do is update your Create React App kind of instance, the version, and you were automatically upgraded from Webpack 1 to Webpack 2, which is kind of the amazing th... |
[1822.10 --> 1824.74] And it was free because you stay within the lines. |
[1824.96 --> 1827.86] Someone else like worked on the hard parts of that, which is cool. |
[1828.06 --> 1828.42] It's nifty. |
[1828.74 --> 1829.22] It's a good idea. |
[1829.96 --> 1830.86] Does that make sense, Michael? |
[1831.44 --> 1837.28] Yeah, it's just it's yeah, I'm just constantly sort of reframing how to think about Webpack. |
[1837.42 --> 1843.02] I think that the longest time I think everybody kind of thought of it as like this compile tool. |
[1843.26 --> 1846.72] And but in actuality, it's more like a platform onto itself. |
[1846.72 --> 1855.12] Like it has a lot of primitives like a like its own module system and with with more types and things like that than the node does. |
[1856.20 --> 1859.40] So, yeah, I'm just kind of reframing how to think about that. |
[1859.94 --> 1861.24] Yeah, it is an interesting tool. |
[1861.54 --> 1865.96] Like it kind of crosses over a few different boundaries of old tools that we've had. |
[1866.28 --> 1871.28] And so if you think about it as a grunt type thing, you'll think about it as a grunt type thing. |
[1871.34 --> 1874.24] If you think about it as a babble type thing, you'll think about it as a babble type thing. |
[1874.24 --> 1879.10] But like it kind of is more of a piece of glue. |
[1879.68 --> 1886.58] But then it still needs to understand things like ES6 modules natively in order to do tree shaking and things like that. |
[1886.98 --> 1889.80] So it's an interesting project. |
[1890.46 --> 1896.44] So I was going through and like reading the whole what's new in the React or create React app article. |
[1897.10 --> 1898.40] And a bunch of it made sense to me. |
[1898.44 --> 1903.18] But there's some things in here that I've like never heard of and I have no idea what they are. |
[1903.18 --> 1906.18] So one of those being just 20. |
[1907.50 --> 1909.12] Yeah, it's a React specific thing. |
[1909.26 --> 1912.14] Just is the test running framework for React. |
[1912.86 --> 1919.52] So it's just they've upgraded just, I guess, two versions that used to be just 18 or something like that. |
[1919.88 --> 1921.52] There are like testing. |
[1921.52 --> 1926.48] Testing is we should do a whole episode on testing sometime in the future. |
[1926.48 --> 1936.76] But one of the hardest parts about testing in the past, if you guys have done testing like at scale for a web app, which may not be the case. |
[1936.76 --> 1949.74] But like functional tests are so sad where you need to like pop open a browser with XVFB and then send web driver commands to it in order to try to click around. |
[1950.14 --> 1951.22] Like they're so slow. |
[1951.36 --> 1956.36] They have so many like false positives and timeouts and problems. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.