Skip to content

Commit

Permalink
fix: make each context unique to prevent them being optimized away by…
Browse files Browse the repository at this point in the history
… Parcel (#5181)

Co-authored-by: Jonas jobb Sandström <Jonas.Sandstrom@goldpen.se>
  • Loading branch information
jonsa and Jonas jobb Sandström committed May 15, 2020
1 parent 1ce9ef1 commit c918dbf
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
5 changes: 4 additions & 1 deletion src/AccordionContext.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import React from 'react';

export default React.createContext(null);
const context = React.createContext(null);
context.displayName = 'AccordionContext';

export default context;
5 changes: 4 additions & 1 deletion src/CardContext.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import React from 'react';

export default React.createContext(null);
const context = React.createContext(null);
context.displayName = 'CardContext';

export default context;
5 changes: 4 additions & 1 deletion src/NavbarContext.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import React from 'react';

export default React.createContext(null);
const context = React.createContext(null);
context.displayName = 'NavbarContext';

export default context;

0 comments on commit c918dbf

Please sign in to comment.