Skip to content
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

3/media query debugger #25

Closed
wants to merge 7 commits into from
Closed

3/media query debugger #25

wants to merge 7 commits into from

Conversation

J-Byron
Copy link
Contributor

@J-Byron J-Byron commented Apr 1, 2020

Closes #3

Notes

When locally linking this component to GIAC using yarn link I ran into the following 3 issues ...

  1. Running $ yarn link gatsby-theme-ample-components in your target repository after running $ yarn link creates a symbolic link in node_modules that overwrites the gatsby-theme-ample-components theme directory in node_modules, causing webpack to fail it's SSR bundle generator. One solution to this is to change the name of your link in package.json

  2. Running $ yarn develop will cause webpack to throw a missing module error in .eslint.rc.js for eslint-plugin-jest. I was able to work around this by removing jest in .eslint.rc.js

  3. After bypassing the previous issue for $ yarn develop I ran into another link issue ... Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons. The solution for this can be found here

@J-Byron J-Byron requested a review from seancdavis April 1, 2020 17:23

const MediaQueryDebugger = ( props ) => {

if (props.isVisible != 'true') return null
Copy link
Contributor Author

@J-Byron J-Byron Apr 1, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was previously process.env.GATSBY_DEBUG_MEDIA_QUERIES !== 'true'. It was replaced to resolve an eslint error that was blocking the build pipeline.

@phritolay
Copy link
Contributor

Closing, #3 will be resolved in #27.

@phritolay phritolay closed this Apr 2, 2020
@phritolay phritolay deleted the 21/media-query-debugger branch April 2, 2020 21:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add media debugger
2 participants