Skip to content

Conversation

@HarishBaskaran-CA
Copy link

resolved 2 issues

  1. useRef null - build failure error
  2. useLayoutEffect - build warning errors

const {reducer, getApiInstance, PanelList, TabList, ApiContext, StateContext, ForceUpdateContext} = getDeps();
const ref = useRef(null);
if (ref.current === null)
const ref = useRef("null");
Copy link
Owner

Choose a reason for hiding this comment

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

const ref=useRef();

if (ref.current === null)
const ref = useRef("null");
if (ref.current === "null")
ref.current = {api: getApiInstance(options), TabListComponent: null, PanelListComponent: null};
Copy link
Owner

Choose a reason for hiding this comment

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

ref.current = ref.current || {api: getApiInstance(options), TabListComponent: null, PanelListComponent: null};

Copy link
Owner

@dev-javascript dev-javascript left a comment

Choose a reason for hiding this comment

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

Hi thank you, could you change the code where useRef is used ( line 4, 5 and 6 )

const ref=useRef();
ref.current = ref.current || {api: getApiInstance(options), TabListComponent: null, PanelListComponent: null};

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.

2 participants