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>
)
}