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

[RFC] How about using tss-react library in material-next-app-router-ts example #38163

Closed
LEv145 opened this issue Jul 26, 2023 · 2 comments
Closed
Assignees
Labels
RFC Request For Comments

Comments

@LEv145
Copy link

LEv145 commented Jul 26, 2023

What's the problem? πŸ€”

I think it's easier to add a dependency to the project than to maintain EmotionCache.tsx

What are the requirements? ❓

Add tss-react library to project

What are our options? πŸ’‘

No response

Proposed solution 🟒

Code with tss-react:

'use client';

import * as React from 'react';
import { ThemeProvider } from '@mui/material/styles';
import CssBaseline from '@mui/material/CssBaseline';
import { NextAppDirEmotionCacheProvider } from "tss-react/next/appDir"
import theme from './theme';

export default function ThemeRegistry({ children }: { children: React.ReactNode }) {
  return (
    <NextAppDirEmotionCacheProvider options={{ key: 'mui' }}>
      <ThemeProvider theme={theme}>
        {/* CssBaseline kickstart an elegant, consistent, and simple baseline to build upon. */}
        <CssBaseline />
        {children}
      </ThemeProvider>
    </NextAppDirEmotionCacheProvider>
  );
}

Resources and benchmarks πŸ”—

No response

@LEv145 LEv145 added RFC Request For Comments status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Jul 26, 2023
@LEv145 LEv145 changed the title [RFC] How about using tss-react library in material-next-app-router-ts [RFC] How about using tss-react library in material-next-app-router-ts example Jul 26, 2023
@mj12albert
Copy link
Member

We are going to work on a dedicated integration package to abstract this away! #34575

@siriwatknp
Copy link
Member

@LEv145 If you don't want to wait, you can start using tss-react right away. It's the same implementation.

@mj12albert mj12albert removed the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Jul 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RFC Request For Comments
Projects
None yet
Development

No branches or pull requests

3 participants