Skip to content

[LiveMotion] Motion element not found. Did you forget to make your target a LiveMotion.motion component? #15

@rutaba-niazi

Description

@rutaba-niazi

I have done the setup as instructed in the readme, but I am unable to test any of the examples provided, in my application. I am getting this error on the console:

[LiveMotion] Motion element not found. Did you forget to make your target a LiveMotion.motion component?

This is my code in the LiveView Component:
`
import LiveMotion, only: [motion: 1]

def render(assigns) do
~H"""

🍿

<button type="button" phx-click={LiveMotion.JS.hide(to: "#popcorn")}> Eat popcorn

""" end ` Here is my app.js ` // Live Motion Library import { createLiveMotion } from 'live_motion';

const { hook: motionHook, handleMotionUpdates } = createLiveMotion();

const Hooks = {_, _, motionHook};
`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions