GithubHelp home page GithubHelp logo

[URGENT] react-toast is injected to DOM by default causes multiple web app using Style UI 2.x to fail on load about tonic-ui HOT 5 CLOSED

trendmicro-frontend avatar trendmicro-frontend commented on May 17, 2024 1
[URGENT] react-toast is injected to DOM by default causes multiple web app using Style UI 2.x to fail on load

from tonic-ui.

Comments (5)

gsaran avatar gsaran commented on May 17, 2024 1

As an update to the previous comment by @joyfulelement, I further extended the exact import to be used for each component and not just theme. For instance, an application using multiple components like Box, Menu, MenuList etc. needs to do exact import for each component:

import Box from '@trendmicro/react-styled-ui/Box'; 
import Menu from '@trendmicro/react-styled-ui/Menu'; 
import MenuList from '@trendmicro/react-styled-ui/Menu/MenuList';

Although, it makes code bit clumsy but it's a temporary fix for now to avoid injection of Toast element into the DOM.

from tonic-ui.

cheton avatar cheton commented on May 17, 2024 1

Resolved in 2a90d3f

It will be available in v0.8 or a later release.

from tonic-ui.

roth1002 avatar roth1002 commented on May 17, 2024

Try

import theme from '@trendmicro/react-styled-ui/theme';

from tonic-ui.

joyfulelement avatar joyfulelement commented on May 17, 2024

Try

import theme from '@trendmicro/react-styled-ui/theme';

Thanks @roth1002. Our team have tried this but didn't work. I've copied the email reply from the developer about this in case you didn't receive it:

I tried the solution that you suggested to use exact import for the theme. But still getting same error. 
I tried adding styled-guide to both Cloud One Header and Landing page apps and do imports as suggested.
 
I also tried using the recommended setup (https://trendmicro-frontend.github.io/styled-ui/getting-started) in Landing which doesn’t require any explicit import for theme. 
Even in that case, same error is thrown. 

from tonic-ui.

cheton avatar cheton commented on May 17, 2024

Fixed in 0.8.0

from tonic-ui.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.