question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

flicker loading with nextjs

See original GitHub issue

I’m trying to use react-multi-select-component inside nextJS with reactJs but i have flickering in the load time. basically, the component appears at the beginning without any styling then looks like the styles get injected a bit late. on load time image After load image

import React, { useState } from 'react';
import MultiSelectBox from 'react-multi-select-component';

export default function MultiSelect(): JSX.Element {
    const options = [
        { label: 'Grapes 🍇', value: 'grapes' },
        { label: 'Mango 🥭', value: 'mango' },
        { label: 'Strawberry 🍓', value: 'strawberry', disabled: true },
        { label: 'Watermelon 🍉', value: 'watermelon' },
        { label: 'Pear 🍐', value: 'pear' },
        { label: 'Apple 🍎', value: 'apple' },
        { label: 'Tangerine 🍊', value: 'tangerine' },
        { label: 'Pineapple 🍍', value: 'pineapple' },
        { label: 'Peach 🍑', value: 'peach' },
    ];

    const [selected, setSelected] = useState([]);

    return (
        <MultiSelectBox
            options={options}
            value={selected}
            onChange={setSelected}
            labelledBy="Select"
        />
    );
}

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
harshzalavadiyacommented, Mar 26, 2021

@mu7amad released v4.0.0 should fix this since CSS is pre-loaded with component not compiled at runtime

1reaction
mu7amadcommented, Mar 2, 2021

Thanks for your support, you are right you can’t reproduce it here because a very small page with no other content with it, but in our situation, we have a big page everything normally comes ready from the server but only the multi-select component comes late

Read more comments on GitHub >

github_iconTop Results From Across the Web

How To Fix Styled Components Page Flicker in Next.js 12+
If your Next. js application has flickering styles when a page loads, try out this quick fix. If you're seeing flickering styles and...
Read more >
Components flicker during server side render for nextjs and ...
But recently I am facing one problem when I am try to use next js and material-ui together. That is the flickering issue....
Read more >
Font Flickering on First load in Next js with Fountsource and ...
I am building one Next.js applications. For styling I am using Material-ui . I am using Inter font from FontSource.
Read more >
Flickering with React/Nextjs - Reddit
Flickering with React/Nextjs. Hi guys, I've I'm building a little app with Nextjs and i'm dealing with authentication.
Read more >
ServerSide Rendering Integration With Flagship [SSR]
This flickering may have an impact on the user experience. In this example, we will show you how to avoid flag value flickering...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found