Releases: Destrokhen-main/Orve-npm
v0.26.4
v0.26.0
Now you can use "fragment" in "forList"
v0.25.0
EN:
forList no longer has a generic render, but can be used in different places. (But just how children)
RU:
forList теперь не имеет общий рендер, а может использоваться в различных местах. (Но только как children)
Example / Пример:
function Component() {
const array = ref([1,2,3]);
return (
<div>
<div>Block - 1</div>
{
array.forList((e) => {
return <div>{ e + 2 }</div> // <div>3</div><div>4</div><div>5</div>
})
}
<div>Block - 2</div>
{
array.forList((e) => {
return <div>{ e * 2 }</div> // <div>2</div><div>4</div><div>6</div>
})
}
</div>
)
}
RU:
У вас есть возможность зарегистрировать глобальный компонент.
EN:
You have the option to register a global bean.
Пример / Example :
import { globalComponent } from "orve"
true (created) | false = globalComponent(name: string, function: () => OrveNode)
EN:
Register components before "createApp" is called
After you can use the component in the application
RU:
Регистрируйте компоненты до того как будет вызван "createApp"
После вы сможете использовать компонент в приложение
RU:
Добавляет возможность отслеживать типы Props.
[name props]: {
type: Тип props (Object, String, Number, Function, Boolean, Array). Если необходимо несколько [Object, String, Number]
required: true | false. default - false
default: Если указали false в required, обязательно нужно заполнить это поле. Если там true, то можно заполнять, а можно пропустить. Для типов Object и Array необходимо вернуть функцию () => {} в остальном можно указывать данные без функций.
}
EN:
Adds the ability to keep track of Props types.
[name props]: {
type: props type (Object, String, Number, Function, Boolean, Array). If multiple [Object, String, Number] are needed
required: true | false. default - false
default: If false is specified in required, this field must be filled in. If there is true, then you can fill in, or you can skip. For Object and Array types, you must return the function () => {} otherwise, you can specify data without functions.
}
Example / Пример:
const Component = ({...}) => {
return (
<div>...</div>
)
}
const DefinedComp = defineProps(Component, {
r: {
type: [Object, String, Number],
required: true,
default: () => ""
},
call: {
type: Function,
required: false,
default: () => { console.log("test") }
},
t: {
type: Array,
required: false,
default: () => []
},
m: {
type: Object,
required: false,
default: () => ({})
}
})
function App() {
return (
<DefinedComp />
)
}
v0.24.0
EN
- User can get context from
orvedirectly - Rewritten types
- Strict mode enabled (but there is a lot of
anytype in the code) - Started work with the refO function.
- The refA function now supports
pop shift unshift splice, the ability to reassign a new array - [BETA] Added new function
createAppRoot. It will allow you not to write in each componentimport orve from "orve"
RU
- Пользователь может получить контекст из
orveнапрямую - Переписаны типы
- Включен строгий режим (но в коде много типа
any) - Начата работа с функцией refO.
- Функция refA теперь поддерживает
pop shift unshift splice, возможность переназначить новый массив - [BETA] Добавлена новая функция
createAppRoot. Она позволит вам не писать в каждом компонентеimport orve from "orve"
createAppRoot
// index.js
import orve from "orve";
import App from "./App";
orve.createAppRoot(<App />).mount("#app");
then you can write component without import orve from "orve"
ref().formate
RU
Добавлена возможность у ref вызывать formate. Данная функция, вернёт объект форматирования.
Пример:
function Component() {
const react = ref(1);
return <div id={react.formate((e) => e + 3)} >{r.formate((e) => e + 1)}</div>
}
Результат
<div id="4" >2</div>
formate может работать с событиями по типу, onclick и всеми ивентами, которые принимают в себя функцию.
function Component() {
const react = ref(1);
return (
<div onClick={r.formate((e) => {
if (e === 1) return () => { console.log("One")}
return () => { console.log("Two") }
})}>text</div>
)
}
EN
Added the ability for ref to call format. This function will return a formatting object.
Example:
function Component() {
const react = ref(1);
return <div id={react.formate((e) => e + 3)} >{r.formate((e) => e + 1)}</div>
}
Result
<div id="4" >2</div>
format can work with events by type, onclick and all events that accept a function.
function Component() {
const react = ref(1);
return (
<div onClick={r.formate((e) => {
if (e === 1) return () => { console.log("One")}
return () => { console.log("Two") }
})}>text</div>
)
}
v0.23.0
fixed vite support. Minor bugs fixed
v0.22.6
Correct mistakes
if it adds refO to the array, then now there will be no error
v0.22.5
- o-html
- first version hooks
unmounted
v0.22.3
Full Changelog: v0.22.2...v0.22.3
v0.22.2
fix some bugs
What's Changed
- patch some bugs by @Destrokhen-main in #41
- added oif worker and fix some bug by @Destrokhen-main in #42
Full Changelog: v0.22.1...v0.22.2
v0.22.1
added oif