-
Notifications
You must be signed in to change notification settings - Fork 75
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
React stack pack #31
Comments
This is great. How about a suggestion for the use of the --> https://reactjs.org/docs/hooks-effect.html#tip-optimizing-performance-by-skipping-effects {
// ...,
skips_applying_effect: If you are using the useEffect() Hook, ensure that you optimize performance by skipping the effect only until certain dependencies have changed. [Learn more](https://reactjs.org/docs/hooks-effect.html#tip-optimizing-performance-by-skipping-effects)
} |
This is a great start @housseindjirdeh A couple of questions to get the ball rolling:
† (For the naysayers: As long as it's server-side rendered (and embedded), it's always going to be faster than traditional CSS approaches because the page will only include the CSS it requires.). |
@djirdehh Ooh good call. With stack packs, we can only extend existing audits (can't add a new |
@benschwarz Thanks a ton, these are all great suggestions.
Although I agree with your footnote, definitely a tricky one. We're trying to not provide directions that are specific but not particularly to React itself. Might be safest to not point users in that direction since many have pretty strong opinions 😅
Good call 👍
Yep like @djirdehh's suggestion, I think it would be worthwhile to include a mention of the different approaches that can be taken to minimize re-renders. Will try and find a place for it!
Definitely would be good to mention preloading/service workers. The main Lighthouse audits suggest these so would be nice if we can mention something more relevant to React here 🤔 |
Is there any way to take advantage of the built in React warnings? The react development mode shows up warns about potential bad practices such as Thinking about bad practices that might lead to bugs maybe look up to potential wrong usage. For example, callback functions executed in the render phase instead of just triggered by the action. <button onClick={callback("fire")} /> I do not know if this goes too much under implementation details I just found myself thinking about it. |
We have an initial set of React-specific suggestions! However, we would love to have more members from the community review and add more if possible.
All thoughts, comments and PRs appreciated!
The text was updated successfully, but these errors were encountered: