-
Notifications
You must be signed in to change notification settings - Fork 10.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[v2] Edit tutorial for changes #5133
Comments
I’d like to take this. What would the scope be? Modifying the code to adhere to breaking changes? |
Great! Yeah, it'd be a case of running through the tutorial using a Gatsby v2 release, then fixing up anything that doesn't work - code examples and changing the text of the tutorials where it makes sense. Note that Gatsby v2 right now is in alpha state so you might hit some rough edges, but I'd be happy to help with anything that I can. For now, useful references might be the breaking changes file and a few of the example sites that've been upgraded. They're the ones that have "next" as the Gatsby dependency version - Having #3986 done first might make this easier. And there might be additional changes once #3740 is in. |
This is my first time trying to run the alpha. Doesn’t look like
followed by loader.js errors. Do you know a version that works? |
Well, looks like you found a bug! 😅 You might run in to a few of these at the moment... If you're up for doing a PR into the Otherwise locally running |
Do react and react-dom have to be installed manually in v2? Ran into similar module not found error, which is fixed by installing the 2 packages manually. I see them listed as peerDependencies in Gatsby, so shouldn’t they not require manual installation? |
👍 yeah they've been shifted to manual installs so people can use their preferred version without waiting for Gatsby releases. |
Alright. I read that starters will be updated to include react and react-dom as dependencies. And since all the tutorials start with starter, there’s no need to mention the need for manual installation, is there? |
That sounds correct, I think. |
@shannonbux In addition to quote style, I’m seeing inconsistencies with the use of semicolons. I’d like to clean this up as I edit the tutorials for v2. Have you reached a decision on which style to follow? |
@ryanditjia I'm not sure how you were planning to approach this, but could you do just one tutorial at a time? i.e. change the first tutorial and then push up a PR for it before starting on any of the other ones. That'll make it much easier to review the changes. |
Inconsistent semicolons is due to Prettier not respecting our no-semicolon rule in JS blocks in markdown. Lemme go see if there's an issue for this already. |
Umm woah, we're specifying to add semi-colons to markdown Line 55 in 3b647d7
I have no idea why... adding a PR to change the setting and remove the semi-colons. |
Actually remembered why — we used to have a lot of React components in the docs that weren't surrounded by |
@ryanditjia thanks for volunteering for this! I'm happy to help with style questions for sure. @KyleAMathews I know you told me the advantages/disadvantages of back tics vs. single quotation marks and now can't remember if we settled on one for the tutorials and docs. |
@m-allanson Yes! That’s exactly the approach I’m taking. Kyle’s no-semi fix seemed to miss blocks that start with ```jsx{arbitrary-number} Once the semis have been cleaned up, I’ll work on editing the tutorials. |
@ryanditjia These artbitrary number adds code highlights (lines with |
@pieh Good to know. PR changed. Thanks! |
Part-two, where we import and console.log css modules styles will result in compilation error How do we want to deal with this breaking change?
import React from "react";
import styles from "./about-css-modules.module.css";
import Container from "../components/container";
console.log(styles);
import React from "react";
import Container from "../components/container";
import styles from "./about-css-modules.module.css";
console.log(styles); I’m partial to 1 but it’s more of personal stylistic preference than anything else. |
Is there a change to layouts in v2? I’m on part-three I can’t seem to get it to work. |
Layouts were removed in v2. Check https://github.com/gatsbyjs/rfcs/blob/remove-layouts/text/0000-remove-special-layout-components.md how to achieve layouts and get query functionality in non-page components |
This is basically done, thanks for all your work @ryanditjia! |
This can go on it's own branch while v2 is in beta.
The text was updated successfully, but these errors were encountered: