@freact/core
Advanced tools
@@ -14,3 +14,3 @@ import { FC, FreactElement, FreactNode, KeyType } from "./types"; | ||
| export { h } from './createElement'; | ||
| export type { FC, FunctionalComponent, FreactNode, FreactElement } from './types'; | ||
| export type { FC, FunctionComponent, FreactNode, FreactElement } from './types'; | ||
| export type { Context } from './createContext'; | ||
@@ -17,0 +17,0 @@ export type { Ref, MutableRef } from './hooks/useRef'; |
@@ -9,3 +9,3 @@ import { ProviderData } from "./createContext"; | ||
| } | ||
| export type FC<T extends PropsNoKey = {}> = FunctionalComponent<T>; | ||
| export type FC<T extends PropsNoKey = {}> = FunctionComponent<T>; | ||
| type FreactText = string | number; | ||
@@ -26,3 +26,3 @@ type FreactChild = FreactElement | FreactText; | ||
| }; | ||
| export interface FunctionalComponent<T extends PropsNoKey = {}> { | ||
| export interface FunctionComponent<T extends PropsNoKey = {}> { | ||
| (props: T): FreactElement; | ||
@@ -29,0 +29,0 @@ } |
+0
-0
@@ -0,0 +0,0 @@ The MIT License (MIT) |
+1
-1
| { | ||
| "name": "@freact/core", | ||
| "version": "0.0.16", | ||
| "version": "0.0.17", | ||
| "author": "Fry", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
+32
-1
| # Freact | ||
| TODO | ||
| Freact is a VDOM-based component library that aims to mimic the API of React. Create a new Freact project by running one of these commands: | ||
| ```sh | ||
| npm init @freact # npm | ||
| yarn create @freact # yarn | ||
| pnpm create @freact # pnpm | ||
| ``` | ||
| Supported React features: | ||
| - Function Components | ||
| - Fragment | ||
| - createContext | ||
| - memo | ||
| - Hooks | ||
| - useState | ||
| - useEffect | ||
| - useRef | ||
| - useReducer | ||
| - useMemo | ||
| - useCallback | ||
| - useContext | ||
| Minimal code example for Freact: | ||
| ```jsx | ||
| import { createRoot } from 'freact'; | ||
| createRoot('#app').render( | ||
| <div>this is a Freact app</div> | ||
| ); | ||
| ``` |
Sorry, the diff of this file is not supported yet
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
85668
0.64%35
775%