Skip to content

Latest commit

 

History

History
executable file
·
107 lines (78 loc) · 6.39 KB

README.md

File metadata and controls

executable file
·
107 lines (78 loc) · 6.39 KB

MyReact -- a React like framework

Deploy License

Examples

Online Next.js example https://mrwangjusttodo.github.io/MrWangJustToDo.io/

Install

# install
pnpm add @my-react/react @my-react/react-dom

start in Next.js

# quick start in next.js
pnpm add -D @my-react/react-refresh @my-react/react-refresh-tools

# next.config.js
const withNext = require("@my-react/react-refresh-tools/withNext");

modules.export = withNext(nextConfig);

start in Vite

# quick start in vite
pnpm add -D @my-react/react-refresh @my-react/react-vite

# vite.config.ts
import react from "@my-react/react-vite";

export default defineConfig({
  plugins: [react()],
});

Packages

Package Version
@my-react/react npm (scoped)
@my-react/react-dom npm (scoped)
refresh
@my-react/react-refresh npm (scoped)
@my-react/react-refresh-tools npm (scoped)
@my-react/react-vite npm (scoped)
internal
@my-react/react-jsx npm (scoped)
@my-react/react-shared npm (scoped)
@my-react/react-reconciler npm (scoped)
experimental
@my-react/react-reactive npm (scoped)

Development

clone this project

pnpm install

pnpm gen:gql

pnpm build

pnpm dev:ssr / dev:csr / dev:next / dev:vite

Api

@my-react/react @my-react/react-dom @my-react/react-reactive @my-react/react (hook) @my-react/react-refresh @my-react/react-refresh-tools @my-react/react-vite
createELement render createReactive useState babel plugin webpack plugin vite plugin
cloneElement renderToString reactive useEffect refresh runtime next.js plugin
isValidElement findDOMNode ref useLayoutEffect webpack loader
Children hydrate computed useRef
lazy createPortal watch useMemo
forwardRef unmountComponentAtNode onBeforeMount useReducer
createContext createRoot (new) onBeforeUnmount useCallback
createRef hydrateRoot (new) onBeforeUpdate useContext
memo renderToNodeStream onMounted useImperativeHandle
Component renderToStaticMarkup onUnmounted useDebugValue
PureComponent renderToStaticNodeStream onUpdated useSignal
StrictMode renderToPipeableStream (new) useDeferredValue (new)
Fragment renderToReadableStream (new) useId (new)
Suspense useInsertionEffect (new)
startTransition useSyncExternalStore (new)
useTransition (new)

DevTool

License

MIT