Skip to content
This repository was archived by the owner on Dec 29, 2022. It is now read-only.

Commit 1e46fef

Browse files
committed
fixed microbundle issue & updated tests
1 parent 929e1da commit 1e46fef

4 files changed

Lines changed: 9 additions & 10 deletions

File tree

README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
<h1 align="center">
2-
🦖 Rex State
3-
</h1>
4-
51
<div align="center">
62

3+
# 🦖 Rex State
4+
75
React States on Steroids 💉💊
86

97
The simplest state management tool for React. Built completely with React Hooks!

__tests__/index.cjs.unit.test.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
import Rex from "../lib/index";
1+
import useRex, { createRexStore } from "../lib/index";
22
import testRunner from "../src/testRunner";
33

4-
const { default: useRex, createRexStore } = Rex;
5-
64
testRunner("Testing CJS Build", useRex, createRexStore);

__tests__/index.umd.unit.test.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
import Rex from "../lib/index.umd";
1+
import useRex, { createRexStore } from "../lib/index.umd";
22
import testRunner from "../src/testRunner";
33

4-
const { default: useRex, createRexStore } = Rex;
5-
64
testRunner("Testing UMD Build", useRex, createRexStore);

src/index.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ import React, {
66
Dispatch
77
} from "react";
88

9+
// @ts-ignore - workaround for the issue with microbundle - https://github.com/developit/microbundle/issues/306
10+
Object.defineProperty(exports, "__esModule", {
11+
value: true
12+
});
13+
914
const useRex = <T extends object>(
1015
defaultState: T
1116
): [T, Dispatch<Partial<Pick<T, keyof T>>>] => {

0 commit comments

Comments
 (0)