New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@arancini/react

Package Overview
Dependencies
Maintainers
1
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@arancini/react - npm Package Compare versions

Comparing version 4.2.0 to 5.0.0

4

package.json

@@ -13,3 +13,3 @@ {

"license": "MIT",
"version": "4.2.0",
"version": "5.0.0",
"scripts": {

@@ -22,3 +22,3 @@ "test": "vitest run --coverage",

"dependencies": {
"@arancini/core": "4.2.0"
"@arancini/core": "5.0.0"
},

@@ -25,0 +25,0 @@ "peerDependencies": {

@@ -28,6 +28,2 @@ # @arancini/react

world.registerSystem(MySystem)
world.init()
const { Entity, Entities, Component, useQuery } =

@@ -65,9 +61,6 @@ createReactAPI(world)

If a child is passed to `Component`, it will be captured and used as the value of the component. This is useful for keeping ECS code decoupled from React code.
If a child is passed to `Component`, it will be captured and used as the value of the component. This is useful for keeping your logic decoupled from React.
```tsx
const world = new A.World()
const ECS = createReactAPI(world)
const Example = () => (
const RefCaptureExample = () => (
<Entity>

@@ -121,3 +114,3 @@ <Component name="object3D">

## Querying the world
## Queries

@@ -130,3 +123,3 @@ ### `useQuery`

const Example = () => {
const entities = useQuery((e) => e.with('health'))
const entitiesWithHealth = useQuery((e) => e.with('health'))

@@ -136,19 +129,1 @@ // ...

```
## Updating Systems
`@arancini/react` does not automatically update systems for you. You will need to call `world.step` yourself. For example, if you are using arancini with `@react-three/fiber`, you can use the `useFrame` hook.
```tsx
import { useFrame } from '@react-three/fiber'
const Game = () => {
useFrame((_, delta) => {
world.step(delta)
})
return (
// ...
)
}
```
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc